Skip to content

The default request sender used throughout the CACCL project.

Notifications You must be signed in to change notification settings

harvard-edtech/caccl-send-request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

The default request sender used throughout the CACCL project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published