-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Allow setting of options of underlying http libraries #661
Comments
Hi @ljckennedy I'm not really sure what do you mean in this case for "libraries". |
Yes - Adapters. Apologies for being vague. For example I want to set the chunksize for mulitpart downloads and to use NTLM for Authentication. 2 separate problems. With the former I have having trouble downloading large files (~2gb) and suspect this may help. The later is requirements for some APIs I need to call. Thanks. |
I see, thanks for the clarification. conn = Faraday.new(...) do |f|
f.adapter :httpclient do |client| # yields HTTPClient
client.chunk_size = CHUNK_SIZE
client.set_auth(domain, user, password)
end
end I'm not really sure about the |
Just added a new section to the Readme until the Wiki is done. |
Thanks that's awesome ! BTW: Am I write in assuming that if I have set conn.request :multipart that faraday will chunk the download? Or do I need code to handle receiving the chunks. I could not find an example so I assumed it is built in, but thought i'd get confirmation. Thanks again. |
So I played with the chunk_size today and it isn't helping with my issue, so maybe I was on the wrong track. Realise this might not be the ideal place to ask, but do you have an example of how to download a very large file? I can download a 600mb file in a minute (from my local network) but a 2.4gb file never finishes. I guess just using multipart and response = conn.get() isn't enough? Do you have an example of how I should do this? |
Hi @ljckennedy I think what you're actually interested in is something called "streaming request". I'll close this issue simply because I believe the original question "Allow setting of options of underlying http libraries" was answered, but please feel free to reopen if that's not the case. |
Some of the libraries used by Faraday support attributes that seem to be unavailable in Faraday (e.g. chunk_size, NTLM Authenitcation.
Can we have a way to set these?
There may already bee a way to do this, but If there is I can't find documentation and/or examples.
The text was updated successfully, but these errors were encountered: