268
questions
0
votes
0
answers
8
views
How to use Newtonsoft JSON serializer for all Flurl 4.0 calls globally or per specific client
I need to use Newtonsoft JSON serializer for all calls made via Flurl 4.0 (or at least for all calls made by a specific Flurl client), but I cannot figure out how to set it up. From the answer to the ...
0
votes
1
answer
45
views
Reverse proxy in ASP.NET Core: how to return the HTTP status code from destination server?
I'm using ASP.NET Core and Flurl to write a reverse proxy that sends requests to one destination server, another server, or both, depending on how the reverse proxy is configured at runtime. I want ...
1
vote
2
answers
91
views
.NET Core 8 - Flurl not using the current user credentials for the default proxy
I am building a .NET Core 8 app that sends an HTTP request to a REST API using Flurl.
When I manually set the proxy with my credentials, it works fine.
However, when I don't set my credentials, the ...
0
votes
1
answer
43
views
Remove Accept-Encoding Header in Flurl.Http
Flurl.Http sends in every Request the following Header:
Accept-Encoding: gzip, deflate
This behaviour is since Update to Version 4.
I would contact API, which returns Error 406 when i send a request ...
0
votes
1
answer
99
views
How to configure Delegating handler in Flurl clientless configuration
Flurl website document shows it has a configuration which allows to pass in Delegating Handlers.
https://flurl.dev/docs/configuration/
It would be at the end of the above link.
All code is configured ...
0
votes
1
answer
57
views
Why is the Json deserializer not working?
I'm quite new to Json files and Blazor, and I was trying to deserialize a Json string, but when I try to fill a list with objects obtained via deserializer the list is full of null objects.
I'm also ...
1
vote
1
answer
79
views
Sending json to an API as a string causes an error, but sending the dotnet object does not
Language: C# .net framework 4.8 Visual Studio 2019.
I was trying to send a json to an API, and if I send it as a string:
string jsonString = JsonConvert.SerializeObject(dataToSend, Formatting.Indented)...
0
votes
2
answers
72
views
How to register multiple Flurl clients in DI container?
Flurl documentation says that the recommended approach for Flurl clients using DI is to utilize this registration pattern:
// at service registration:
services.AddSingleton<IFlurlClientCache>(sp ...
0
votes
1
answer
92
views
Update from IFlurlClientFactory to IFlurlClientCache - Do I need using around IFlurlClientFactory.GetOrAdd()?
I have recently updated from the old IFlurlClientFactory to the new IFlurlClientCache and thus applied all the required changes.
We were seeing an issue when using the following code:
public class ...
0
votes
0
answers
143
views
How to move away from CustomHttpClientFactory in Flurl 4.0?
What we have implemented currently is something like this: https://v3.flurl.dev/docs/configuration/#httpclientfactory with the CustomHttpClientFactory being a BearerTokenManagingHttpClientFactory ...
0
votes
0
answers
33
views
FlurlHttp not including response in event handlers
I am trying to get some information from my response when handling errors, but I cannot seem to figure out why the response is never included. I have tried both AfterCall and OnError, both do not ...
2
votes
1
answer
364
views
How to specify a proxy for a Flurl client in version 4.0.x?
We're using Flurl v3.0.7 and Flurl.Http v3.2.4. To set up a proxy for a client, we use a helper class:
public class ProxyHttpClientFactory : DefaultHttpClientFactory {
private readonly string ...
2
votes
1
answer
740
views
FLURL 4.0 use Newtonsoft JSON Serializer on a single request
Referencing Flurl Serializers it shows that Flurl 4.0 can use the Newtonsoft based serializer, but it is not clear to me how to do this for a single request. I need this to address a circular loop ...
0
votes
1
answer
91
views
Flurl Client Usage with Placeholder in URL
We are aware that it's important to make sure Flurl clients are re-used where possible and that this is controlled via the URL that is supplied to the Get method of IFlurlClientFactory.
Some of the ...
-1
votes
1
answer
74
views
How to correctly handle a 204 Response in Flurl
I am working with the Audiocodes SBC API which returns for example when no Alarms are available a 204 as response. This leads to FLurl GetJsonAsync request returning null. The problem now is how would ...