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

Fixes reading response data in multiple chunks #7

Merged
merged 1 commit into from
Dec 27, 2016

Conversation

vojtechhabarta
Copy link

This PR fixes problem with larger response from Jenkins API.
When response data are larger it is needed to read all chunks and join them before parsing the json (http://stackoverflow.com/questions/5083914/get-the-whole-response-body-when-the-response-is-chunked).

(BTW instead of request library I would recommend to use axios which uses Promise API, parses JSON by default and works well with TypeScript async/await.)

@alefragnani
Copy link
Owner

Hi @vojtechhabarta,

First of all, thanks for the PR. I didn't have this issue, but probably because my Jenkins jobs are simple, and didn't fire chunks. I'll test it and release an update ASAP.

About the axios library, I'll take a look later, testing it with other features that I intend to add to the extension. Thanks for your suggestion.

@alefragnani alefragnani self-assigned this Dec 26, 2016
@alefragnani alefragnani merged commit 9638518 into alefragnani:master Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants