caccl-send-request
TypeScript icon, indicating that this package has built-in type declarations

2.2.4 • Public • Published

caccl-send-request

The default request sender used throughout the CACCL project.

Part of the CACCL library

Canvas
App
Complete
Connection
Library

Description

Sends an http request, handles paging, retries failed requests, and processes the response.

Argument Type Description Default
host string host to send the request to none
path string path to send the request to none
method string http method to use GET
params object query/body/data to include in the request {}
headers object headers to include in the request {}
numRetries number number of times to retry the request if it fails 0
ignoreSSLIssues boolean if true, ignores self-signed certificate issues false usually, true if host is localhost:8088

Returns: Promise.<CACCLError|object> Returns promise that resolves with { body, status, headers } on success, rejects with CACCLError (see caccl-error on npm) on failure.

Note: This function sends cross-origin credentials if process.env.NODE_ENV equals development.

Package Sidebar

Install

npm i caccl-send-request

Weekly Downloads

66

Version

2.2.4

License

MIT

Unpacked Size

23.9 kB

Total Files

12

Last publish

Collaborators

  • gabeabrams