Activities of "krashhh"

Hi,

I want to use Dynamic API Client Proxy, but I need an option to change the base URL in runtime before specific service API call.

public class MyService : ITransientDependency
{
    private readonly IHttpClientProxy<IBookAppService> _bookService;

    public MyService(IHttpClientProxy<IBookAppService> bookHttpClientProxy)
    {
        _bookHttpClientProxy = bookHttpClientProxy;
    }

    public async Task DoIt()
    {
       ** _bookHttpClientProxy.BaseURL = "xyz";     // Something like this.**
        var books = await _bookHttpClientProxy.Service.GetListAsync();
        foreach (var book in books)
        {
            Console.WriteLine($"[BOOK {book.Id}] Name={book.Name}");
        }
    }
}

Please help me how I can extend something to achieve this functionality?

Error occured while getting the latest version from https://abp.io/api/download/template/get-version/ : Remote server returns '500-Internal Server Error'. Message: An internal error occurred during your request! [16:54:56 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

[16:54:56 ERR] Use command: abp new Acme.BookStore -v version Volo.Abp.Cli.CliUsageException: Use command: abp new Acme.BookStore -v version at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.GetAsync(String name, String type, String version, String templateSource, Boolean includePreReleases) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 80 at Volo.Abp.Cli.ProjectBuilding.TemplateProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\TemplateProjectBuilder.cs:line 57 at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\NewCommand.cs:line 194 at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SolutionService.CreateSolutionAsync(CreateSolutionModel input) at lambda_method1677(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

Showing 1 to 2 of 2 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11