-
-
Notifications
You must be signed in to change notification settings - Fork 935
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
Major refactoring #921
Major refactoring #921
Conversation
Url
usageUrl
usage, drop query
option
c919fee
to
b803076
Compare
Url
usage, drop query
option
This comment has been minimized.
This comment has been minimized.
Okay, the only thing to do is to review documentation. Make necessary changes, then it's good to merge. |
TODO: |
Parsing method used to retrieve the body from the response. Can be `'default'`, `'text'`, `'json'` or `'buffer'`. The promise has `.json()` and `.buffer()` and `.text()` functions which set this option automatically. | ||
Parsing method used to retrieve the body from the response. | ||
|
||
- `'default'` - if `options.encoding` is `null`, the body will be a Buffer. Otherwise it will be a string unless it's overwritten in a `afterResponse` hook, |
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.
Should we remove the null
thing to get buffer
as the user can just do responseType: 'buffer'
instead? Which is also much clearer.
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.
Sure, I'll send a PR.
Really nice work on this!! 🙌 I'm glad you got to this before the release. |
Url
usagequery
optiongot.mergeInstances
beforeRetry
andbaseUrl
#867 (if possible, replacesprefixUrl
in the URL)http.request(url, options, callback)
when targeting Node 10.9.0 #580204 No Content
when parsing response #925promise.json()
doesn't work if the promise has been already resolved #931afterResponse
hook should triggerbeforeRetry
hook #918options.stream
tooptions.isStream
got.create(...)
undefined
are removed (bf206ca was made because Make it possible to unset the defaultuser-agent
header #496 was followed by Support discrete client configuration viagot.create([options])
#495 and Support discrete client configuration viagot.create([options])
#495 had differentmerge
mechanism)Checklist