The SetQueryParam method produces "Cannot create a Request. Neither BaseUrl nor the first segment passed is a valid URL. " exception on some strings like
var uri = "http://myhost.com/upload".SetQueryParam("name", "Dedant-Simon - ELR & Hollange - IPESS Ougrée pg.2.jpg")
The exception is throw on POST
using (var client = new FlurlClient(uri))
{
fileUploadResultDto = client.Request()
.WithHeader("accept", "application/json")
.PostMultipartAsync(p =>
{
var fileStream = file.OpenRead();
p.AddFile(fileName, fileStream, fileName, GetMimeType(Path.GetExtension(fileName)));
})
.ReceiveJson<FileUploadResultDto>().Result;
}
If I replace the string "Dedant-Simon - ELR & Hollange - IPESS Ougrée pg.2.jpg" with simple one everything works fine.
The
SetQueryParammethod produces "Cannot create a Request. Neither BaseUrl nor the first segment passed is a valid URL. " exception on some strings likevar uri = "http://myhost.com/upload".SetQueryParam("name", "Dedant-Simon - ELR & Hollange - IPESS Ougrée pg.2.jpg")The exception is throw on POST
If I replace the string "Dedant-Simon - ELR & Hollange - IPESS Ougrée pg.2.jpg" with simple one everything works fine.