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

Fix uploadContent for node.js #226

Merged
merged 1 commit into from Oct 9, 2016
Merged

Fix uploadContent for node.js #226

merged 1 commit into from Oct 9, 2016

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Oct 8, 2016

9e89e71 broke uploadContent, making it set 'json=true' on the request, so that we would try to turn raw content into JSON. It also misguidedly set a client-side timeout of 30s.

Fix that, and add some tests to check uploadContent works.

In mock-request: distinguish between an expectation (ExpectedRequest) and an actual request (Request). Add support for checking the headers, and the request options in general, to Request.

9e89e71 broke uploadContent, making it set 'json=true' on the request, so that
we would try to turn raw content into JSON. It also misguidedly set a
client-side timeout of 30s.

Fix that, and add some tests to check uploadContent works.

In mock-request: distinguish between an expectation (ExpectedRequest)
and an actual request (Request). Add support for checking the headers, and the
request options in general, to Request.
Copy link
Member

@ara4n ara4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. only thought would be to explicitly comment the bifurcated API on uploadContent between browser & node paths

@richvdh
Copy link
Member Author

richvdh commented Oct 9, 2016

I've tried to address the bifurcated API in #230.

@richvdh richvdh merged commit 631eeb9 into develop Oct 9, 2016
@richvdh richvdh deleted the rav/fix_upload branch October 10, 2016 11:27
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

Successfully merging this pull request may close these issues.

None yet

2 participants