Skip to content
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

The next major version of gofer #49

Closed
31 tasks done
jkrems opened this issue Dec 2, 2015 · 3 comments
Closed
31 tasks done

The next major version of gofer #49

jkrems opened this issue Dec 2, 2015 · 3 comments

Comments

@jkrems
Copy link
Collaborator

jkrems commented Dec 2, 2015

Current Status
  • Gofer.fetch(uri), Gofer.fetch(uri, options), Gofer.fetch(uri, options, callback) are supported.
  • Gofer is the default export
  • config has global-, service-, and endpoint defaults
  • Endpoints functions can be written to support promise- and callback-usage.
  • When a callback is provided, it's used and fetch returns undefined.
  • It's possible to retrieve a Promise<Stream> and pipe it.
  • It throws when the baseUrl contains a query string.
  • baseUrl is just an option, there's no default option mapper.
  • clearOptionMappers doesn't exist.
  • The callback accepts three arguments: (error, data, response).
  • There is no gofer/hub.
  • The User-Agent is constructed from clientName and clientVersion.
  • Each client class gets its own agent that controls the 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 parameters
  • options.json: Object that will be serialized to JSON.
  • options.form: Object that will be serialized via qs 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.
  • Fail on missing path params, see Fail on missing path params #50
  • options.maxSockets: How many connections/sockets in parallel are allowed.
  • options.rejectUnauthorized: Same as node's own rejectUnauthorized.
  • options.headers: Works just like node's own headers option.
  • Provide example of using an option mapper (?) to support multi-part form bodies
  • Support for environments like browsers or React native where fetch is available
Resources
@jkrems jkrems changed the title Proposal: The next major version of gofer The next major version of gofer Apr 6, 2016
@jkrems
Copy link
Collaborator Author

jkrems commented Apr 19, 2016

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..?

@dbushong
Copy link
Member

+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
#49 (comment)

@jkrems
Copy link
Collaborator Author

jkrems commented Apr 19, 2016

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.

@jkrems jkrems closed this as completed Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants