-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
✨ Request util to wrap got
library
#8980
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aileen
force-pushed
the
request-util-got
branch
from
September 7, 2017 08:11
56211cf
to
180cb78
Compare
aileen
changed the title
[WIP] ✨ Wrapped
✨ Request util to wrap Sep 7, 2017
got
lib in request utilgot
library
6 tasks
ErisDS
reviewed
Sep 7, 2017
core/server/utils/request.js
Outdated
).then(function (response) { | ||
return Promise.resolve(response); | ||
}).catch(function (err) { | ||
return Promise.reject(new errors.InternalServerError({ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
aileen
force-pushed
the
request-util-got
branch
2 times, most recently
from
September 7, 2017 09:48
ce7c005
to
8672aae
Compare
no issue This PR includes a new util which wraps the `got` library. It is not used in the codebase yet, but tested with `image-size` util: - wraps `got` request library in its own `request.js` util that returns bluebird promises and validates URL before starting a request - adds tests
aileen
force-pushed
the
request-util-got
branch
from
September 7, 2017 09:57
8672aae
to
76652ac
Compare
ErisDS
added a commit
to ErisDS/Ghost
that referenced
this pull request
Sep 7, 2017
refs TryGhost#8980 -☹️ apparently this is actually the only way
aileen
pushed a commit
that referenced
this pull request
Sep 7, 2017
refs #8980 -☹️ apparently this is actually the only way
kirrg001
added a commit
to kirrg001/Ghost
that referenced
this pull request
Dec 14, 2017
aileen
pushed a commit
that referenced
this pull request
Dec 15, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
no issue
This PR includes a new util which wraps the
got
library. It is not used in the codebase yet, but tested withimage-size
util:got
request library in its ownrequest.js
util that returns bluebird promises and validates URL before starting a requestTODOS:
getCachedImageSizeFromUrl
always received the result.