I've just started using .netcore.
I need to create a url, I've come across UriBuilder
however I can only see example of using that with named paramters e.g.: localhost?value=abc&another=def
, however I want to construct without parameter names, so:
localhost/abc/def/
Is this possible, I was thinking maybe something like the below:
var request = new HttpRequestMessage();
request.RequestUri = new Uri(_myUrl);
request.Method = HttpMethod.Get;
var uriBuilder = new UriBuilder(request.RequestUri);
var query = HttpUtility.ParseQueryString(uriBuilder.Query);
query[0] = "abc"
Any help appreciated.