-
Notifications
You must be signed in to change notification settings - Fork 23
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
Additional options to r.http
#39
base: master
Are you sure you want to change the base?
Conversation
Thanks @marshall007, I've been quite busy these past weeks and didn't have much time to work on reqlite, so I really appreciate your help :) What you probably want to populate is Let me know if you have more questions. |
No problem! One other thing: when I call |
@marshall007 -- arrays are represented with the MAKE_ARRAY from the proto-def.js file:
If you want it as |
@neumino if I call Could you explain what |
Sure, first sorry for the lack of comments/doc. I'll try to improve that. Then basically For example In the case of
In this case it's trivial to evaluate the options, it's
|
timeout: internalOptions.timeout || 30000, | ||
maxRedirects: internalOptions.redirects || 1, | ||
qs: internalOptions.params, | ||
headers: httpUtil.headers(internalOptions.header) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you want options.header
Added a few comments in your commits, hopefully it make things more clear. Let me know if you have more questions. |
Oh also So for example for |
See #36. Still not the complete list, but this adds support for:
There are currently three failing test cases. I think this is because
Query::evaluate
is stripping out all the options passed tor.http
. I haven't had time to figure out why that's the case and I'm also not sure whether I should expectoptions
orinternalOptions
to be populated with the user-supplied options. Let me know and I'll update this PR.The reason I don't have tests for
timeout
andredirects
is because (AFAIK) there's no way to emulate that with httpbin.