Closed jkrems closed 8 years ago
cc @dbushong @ageitgey There's now an - afaict - complete implementation on the jk-gofer-goes-fetch
branch. It's one of those things that's really hard to review. Maybe David and I could sit down and go through it, looking for pending issues..?
+1
David Bushong
On Mon, Apr 18, 2016 at 5:24 PM, Jan Olaf Krems notifications@github.com wrote:
cc @dbushong https://github.com/dbushong @ageitgey https://github.com/ageitgey There's now a - afaict - complete implementation on the jk-gofer-goes-fetch branch https://github.com/groupon/gofer/tree/jk-gofer-goes-fetch. It's one of those things that's really hard to review. Maybe David and I could sit down and go through it, looking for pending issues..?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/groupon/gofer/issues/49#issuecomment-211647636
This is now set up as the 3.x
branch. PRs against that branch will be released with a beta
dist-tag to npm. PRs against master will be released with latest
dist-tag (just like before). That way npm install gofer
will install 2.x and npm install gofer@beta
will install 3.x.
Current Status
Gofer.fetch(uri)
,Gofer.fetch(uri, options)
,Gofer.fetch(uri, options, callback)
are supported.Gofer
is the default exportconfig
has global-, service-, and endpoint defaultsfetch
returnsundefined
.Promise<Stream>
and pipe it.baseUrl
contains a query string.baseUrl
is just an option, there's no default option mapper.clearOptionMappers
doesn't exist.(error, data, response)
.gofer/hub
.clientName
andclientVersion
.maxSockets
setting for that API.options.body
: It's possible to pass a readable stream.options.body
: It's possible to pass a buffer.options.body
: It's possible to pass a string.options.method
, uppercase HTTP method.options.qs
: Nested query string parametersoptions.json
: Object that will be serialized to JSON.options.form
: Object that will be serialized viaqs
to a form encoded body.options.auth
(string): Will be used to generate a basic auth header.options.auth
(object):username
/password
pair used to generate a basic auth header.options.connectTimeout
: Determines how long to wait for a successful TCP connection after acquiring a socket.options.timeout
: Determines how long to wait for response headers. Also controls the socket read timeout.options.pathParams
: Object with params that will be inserted into{placeholder}
s in the URL.options.maxSockets
: How many connections/sockets in parallel are allowed.options.rejectUnauthorized
: Same as node's ownrejectUnauthorized
.options.headers
: Works just like node's ownheaders
option.fetch
is availableResources