flurl Questions

2

Solved

I know that with the Flurl HTTP .NET library I can set a global proxy by using a custom HttpClientFactory, but is there a way to choose a custom proxy for each request? With many other programming...
Hudis asked 8/10, 2018 at 19:24

3

Solved

We are using FlurlClient in a few projects and familiar with their fluent interface. We now want to use it in asp.net core integration tests using TestServer. The example from http://asp.net-hacke...
Wretch asked 3/5, 2018 at 12:58

9

I want to do a simple HTTP request in C#, but something is not working and all I got is 403 Forbidden status code. When I try to do same request in Postman, everything works fine. I tried to run F...
Palmerpalmerston asked 30/6, 2019 at 8:35

4

Solved

Flurl has methods for doing OAuth and Basic authentication: await url.WithBasicAuth("username", "password").GetJsonAsync(); await url.WithOAuthBearerToken("mytoken").GetJsonAsync(); but how do I...
Punchboard asked 15/9, 2018 at 17:33

4

Solved

Currently I have this request: await url .SetQueryParams(queryString) .SetClaimsToken() .GetJsonAsync<T>() I'd like to start using Polly (https://github.com/App-vNext/Polly) now to hand...
Tallbot asked 22/11, 2016 at 15:31

2

Solved

I'm currently using Polly and Flurl together, but I have a common retry policy that I have to add to every request. I notice that Polly allows you to set a default using AddPolicyHandler(...) but t...
Trommel asked 11/9, 2018 at 9:2

2

Solved

I am attempting to post some data that includes a string array to an endpoint but receiving an error "Invalid array" Doing this: .PostUrlEncodedAsync(new { amount = 1000, allowed_source_types...
Grig asked 4/2, 2019 at 14:7

2

Solved

Hi I'm using Flurl and I need to set multiple headers for the post and the documentation on the site states to do await url.WithHeaders(new { h1 = "foo", h2 = "bar" }).GetJsonAsync(); I'm not sur...
Vaclav asked 6/3, 2016 at 11:59

3

Solved

I can set http proxy with this code: public class CustomFlurlHttpClient : DefaultHttpClientFactory { public override HttpClient CreateClient(Url url, HttpMessageHandler m) { return base.CreateCl...
Overfeed asked 8/4, 2017 at 11:16

2

While writing a class to download images from a server in parallel (employing a consumer/producer pattern backed by the DataFlow TPL library), using an ActionBlock and Flurl.Http facility method Do...

2

Solved

I'm trying to upload a file with body content. Is PostMultipartAsync the only way? On my C# backend code I have this: var resource = FormBind<StorageFileResource>(); var file = Request.Fil...
Heldentenor asked 8/12, 2016 at 15:6

3

Solved

Currently I worked on Flurl and I tried to contact an API in https (I am in my lab). So the certificate is not valid and Flurl can't continue to work :/ Here is my error message: Unhandled Except...
Viscosity asked 19/12, 2018 at 14:14

3

Solved

I am using FlurlHttp and I want to disable AllowAutoRedirect for some API calls. I know How can I get System.Net.Http.HttpClient to not follow 302 redirects? WebRequestHandler webRequestHandler = n...

1

Solved

Asp.NET core logs each request that enters based on configuration. Now i'd like to have the same functionality for Flurl requests i sent. Most notably, I of course would like to know when a request...
Alemannic asked 21/11, 2019 at 9:36

2

Solved

I'm trying to access my RESTful API to retrieve data from a MySQL database. Everything is set up and works perfectly on my C# WPF project. But when using the exact same code in Xamarin Forms (built...
Adey asked 17/6, 2019 at 21:54

2

Solved

After updating Blazor from 0.5.1 (with working Flurl) to 0.6.0, calls via flurl throw an exception: WASM: [Flurl.Http.FlurlHttpException] Call failed. Cannot invoke method because it was wiped. S...
Supertanker asked 26/9, 2018 at 16:5

0

Following from Set a default Polly policy with Flurl How do I use Polly with Flurl without the factory? This only calls it once string s = await Policy .Handle<HttpRequestException> () ....
Externalize asked 17/4, 2019 at 0:49

1

Solved

I am totally new to Flurl.I am trying to call api and i deliberately passed invalid apikey in paramter and then api fails saying "Forbidden" and with error code 403. How can i handle that in Except...
Manizales asked 6/3, 2019 at 10:27

1

Solved

I start with Flurl and I would like to create a POST but I think I have a problem with the format of my JSON parameters. You can see the JSON parameters: { "aaaUser" : { "attributes" : { "name...
Lazybones asked 14/12, 2018 at 10:53

2

Used the Flurl to Get response from API. var response = await url.WithClient(fc) .WithHeader("Authorization", requestDto.ApiKey) .GetJsonAsync<T>(); dynamic httpResponse = response.Result;...
Ameeameer asked 19/4, 2017 at 7:3

1

Solved

Flurl states that using singleton client is recommended pattern: HttpClient is intended to be instantiated once and re-used throughout the life of an application. Especially in server applicatio...
Linders asked 26/6, 2018 at 7:35

1

Solved

I have a simple post request using the Flurl client, and I was wondering how to make this request using a proxy using information like the IP, port, username, and password. string result = await a...
Hospital asked 1/6, 2018 at 18:41

1

I've created an API in .NET Core 2 using C#. It returns an ActionResult with a status code and string message. In another application, I call the API using Flurl. I can get the status code number, ...
Handling asked 31/5, 2018 at 18:43

3

Solved

I'm having trouble setting the Content-Type on HttpClient. I followed along this question: How do you set the Content-Type header for an HttpClient request? But still no luck. String rcString = Js...
Loginov asked 4/3, 2015 at 9:43

5

Solved

I am using flurl to submit HTTP request and this is very useful. Now I need to change the "Content-Type" header for some of the requests to "application/json;odata=verbose" public async Task<J...
Whiz asked 13/6, 2017 at 7:45

© 2022 - 2025 — McMap. All rights reserved.