Comments (8)
Please ask on Stack Overflow and I'll be happy to answer. You should include the definition of ProxyHttpClientFactory. I can assume what that might look like, but it's a class defined in your code, not Flurl, so it would be helpful to others to see it. Thanks.
from flurl.
Answered here. I think the confusion here might be that setting a proxy needs to happen via the new FlurlClientBuilder object now, rather than through FlurlClient directly. This is because in 4.0 the underlying HttpClient is always created/selected up front when a FlurlClient is created. That was a nice simplification and eliminated some quirks that existed in 3.x's lazy approach, but it also meant that once a FlurlClient is created, it's already too late to mess with message handlers.
from flurl.
You need to call Request()
first.
from flurl.
I have the same question and I suspect I'm not the only one. I did not find it asked at StackOverflow, so I will post a question there, but it would be really helpful to have a sample in the documentation (and, yes, I saw the https://flurl.dev/docs/configuration/?#message-handlers sample, but it's not how we make a call, so need to find out how to transition from the @vManTech's code to v4).
from flurl.
@tmenier I asked on StackOverflow: https://stackoverflow.com/questions/78163497/how-to-specify-a-proxy-for-a-flurl-client-in-version-4-0-x
from flurl.
@tmenier That's simpler than I thought. :-) Thanks a lot.
from flurl.
@tmenier I just tried your suggestion from the Stack Overflow answer and it does not work. The FlurlClientBuilder
's Build
method returns the IFlurlClient
instance, but there are no methods defined on this interface to make HTTP calls other than SendAsync, so you cannot invoke PostJsonAsync
, PatchJsonAsync
, or other method in the IFlurlClient
interface. Would you mind taking another look at this? Thanks.
from flurl.
Oh, man, so sorry for being a dummy. Thanks a lot for a quick response.
from flurl.
Related Issues (20)
- Parsing Empty List result in null instead of empty list HOT 5
- upgrade to Flurl 4.x but keep Flurl.Http at <4 HOT 6
- Add `bool IFlurlClientCache.TryGet(string name, out IFlurlClient client)` HOT 1
- How can I speed limit when upload file HOT 1
- HttpTest WithRequestJson does not use JsonSerializer set on FlurlClientCache HOT 3
- Deadlock (or something weird) when calling `GetStringAsync` HOT 2
- 4.0.0 HOT 2
- System.EntryPointNotFoundException on PostJsonAsync HOT 1
- Add support for CancellationToken in IFlurlResponse asynchronous methods HOT 1
- Add option to disable conversion of plus signs to spaces for query parameters HOT 3
- According to RFC-7578 the Content-Disposition filename* parameter in multipart MUST NOT be used
- IFlurlClientBuilder.AddMiddleware cuts the chain of delegating handlers HOT 1
- Encode Issue HOT 2
- .net 8 blazor wasm PlatformNotSupportedException HOT 7
- GetJsonAsync<T> is not working after upgrading the Flurl Http to version 4 >= HOT 5
- The response ended prematurely HOT 2
- Trimming unused code causes the exception - Response could not be deserialized to JSON HOT 4
- Not able to configure Delegating handler in Flurl clientless DI configuration HOT 2
- Collection was modified; enumeration operation may not execute. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flurl.