NBomber
NBomber copied to clipboard
Cannot use BaseAddress of the httpClient with NBomber.Plugins.Http
trafficstars
I have a static helper to set Timeout and BaseAddress of http clients and creating the HttpClientFactory.

If I try to use CreateRequest method from plugin like this, using Relative Uri it fails when running load tests:

And the resulted error in the console is this:

Am I using it wrong or it can be improved to support also relative paths there, like the one in HttpClient (used for all exposed methods with strings as url)?
private static Uri? CreateUri(string? uri) =>
string.IsNullOrEmpty(uri) ? null : new Uri(uri, UriKind.RelativeOrAbsolute);
Hi @CrazyLlama98 I think this case was not covered initially. Can you try to prepare PR?
Sure, I think it needs to be in the NBomber.Http. I will prepare it