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

Progress API #30

Open
dereke opened this issue Jul 26, 2017 · 0 comments
Open

Progress API #30

dereke opened this issue Jul 26, 2017 · 0 comments

Comments

@dereke
Copy link
Member

dereke commented Jul 26, 2017

There is currently no way to get progress information when making large requests.

Httpism should use this API:

const http = httpism.client({progress: handleProgress})
...
http.post('/blah', bigRequest)

handleProgress would be a function that has one argument:

{
  type: 'download|upload'
  total: 1000,
  current: 100,
  request: ...,
  options: ...,
  response: ...
}

You could also get progress on individual requests:

http.post('/blah', bigRequest, {progress: handleProgress})

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

1 participant