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

replaced superagent with request #131

Merged
merged 1 commit into from
Sep 27, 2016
Merged

Conversation

tehsis
Copy link
Contributor

@tehsis tehsis commented Sep 27, 2016

This PR replaces superagent with request and adds some workarounds to not break current behavior.

@tehsis tehsis force-pushed the master branch 2 times, most recently from 212cbb2 to 313fb18 Compare September 27, 2016 02:23
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling 313fb18 on tehsis:master into b6f9987 on auth0:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling 313fb18 on tehsis:master into b6f9987 on auth0:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling 2bd6762 on tehsis:master into b6f9987 on auth0:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling 8adb102 on tehsis:master into b6f9987 on auth0:master.

@tehsis tehsis force-pushed the master branch 2 times, most recently from e8f2c1d to f075dfb Compare September 27, 2016 03:29
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling f075dfb on tehsis:master into b6f9987 on auth0:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling f075dfb on tehsis:master into b6f9987 on auth0:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 93.306% when pulling 3aa1354 on tehsis:master into b6f9987 on auth0:master.

@chriskeyser
Copy link

Discussed not returning from reject/resolve but this was previous behavior, so not changing to keep consistency with prior behavior.

@chriskeyser
Copy link

LGTM

@@ -56,6 +56,30 @@ utils.wrapPropertyMethod = function (Parent, name, propertyMethod) {
*/
utils.getRequestPromise = function (settings) {
return new Promise(function (resolve, reject) {
var json = null;
Copy link
Member

Choose a reason for hiding this comment

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

where are you using these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cleared

@@ -8,12 +8,12 @@ module.exports = function (body, boundary) {
.split(partRegexp)
.forEach(function (part) {
// Ignore empty strings in the array.
if (part.length === 0) return;
if (part.trim().length === 0) return;
Copy link
Member

Choose a reason for hiding this comment

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

is this request related? change in tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, not really sure about this. But the headers on request has some whitespaces between that's why I needed to trim them.

This is using request:

----------------------------454702286045209682268136
Content-Disposition: form-data; name="users"; filename="users.json"
Content-Type: application/json

[]

----------------------------454702286045209682268136
Content-Disposition: form-data; name="connection_id"

con_test
----------------------------454702286045209682268136--

and this superagent:

----------------------------392237490125139977580197Content-Disposition: form-data; name="connection_id"con_test----------------------------392237490125139977580197Content-Disposition: form-data; name="users"; filename="users.json"Content-Type: application/json[]----------------------------392237490125139977580197--

Do you think it can be an issue?

@@ -1,6 +1,7 @@
var request = require('superagent');
var request = require('request');
Copy link
Member

Choose a reason for hiding this comment

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

why don't we use request-promise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just wanted to made as few changes as possible while providing consistency

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 94.84% when pulling a4ebdfd on tehsis:master into b6f9987 on auth0:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 94.84% when pulling a4ebdfd on tehsis:master into b6f9987 on auth0:master.

@dschenkelman dschenkelman merged commit b3e1125 into auth0:master Sep 27, 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

Successfully merging this pull request may close these issues.

4 participants