Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-request-promise

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-request-promise

Yet another promise-based HTTP request library built on jQuery.

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

http-request-promise

Yet another promise-based HTTP request library using jQuery

Why another HTTP request library using jQuery

  • If you use simlilar library such axios or popsicle for CORS POST request, you may find the request fails at preflight stage (Google Chrome ver 61.0.3). However, the similar request works fine with jQuery. (e.g. this issue). It's actually not axios or popsicle's fault as jQuery sets Conetent-Type of POST requests to application/x-www-form-urlencoded by default and thus doesn't get preflighted. However, it does prove that it might still be a good choice for client side http requests using jQuery to avoid possible issues.

  • jQuery's Promise interface is not compitiable with ES6 Promises. This library warps jQuery's Promise interface with standard ES6 Promise.

  • Simplify the error handling. In case error happens, the thrown error will comes with the following propertoes:

    • statusCode: status code of the response
    • statusText: stats text of the response
    • responseText: response body

Installing

npm install http-request-promise

Keywords

FAQs

Package last updated on 04 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc