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

✨ Request util to wrap got library #8980

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

aileen
Copy link
Member

@aileen aileen commented Sep 6, 2017

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

TODOS:

  • investigate if Promises get resolved and rejected at the right time and getCachedImageSizeFromUrl always received the result.

@aileen aileen changed the title [WIP] ✨ Wrapped got lib in request util ✨ Request util to wrap got library Sep 7, 2017
).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.

@aileen aileen force-pushed the request-util-got branch 2 times, most recently from ce7c005 to 8672aae Compare September 7, 2017 09:48
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
@ErisDS ErisDS merged commit 6c216b8 into TryGhost:master Sep 7, 2017
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
@aileen aileen mentioned this pull request Sep 19, 2017
4 tasks
@aileen aileen deleted the request-util-got branch October 13, 2017 08:30
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
@ErisDS ErisDS removed their assignment Jun 22, 2021
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.

2 participants