Narwhals Poke Mammals

    This package has been deprecated

    Author message:

    WARNING: We renamed this module to @webex/http-core. Please install it instead. See https://github.com/webex/spark-js-sdk#the-cisco-webex-js-sdk for more information.

    @ciscospark/http-core

    1.52.2 • Public • Published

    @ciscospark/http-core

    standard-readme compliant

    Core HTTP library for the Cisco Webex JS SDK.

    Install

    npm install --save @ciscospark/http-core

    Usage

    detect(), detectSync()

    Detects the filetype of the specified file.

    request()

    Same api as request with the following changes:

    • Promise-based instead of nodeback based
    • Adds an interceptors property to the options object for adding classes that intercept and modify each request
    • 4XX and 5XX responses get rejected with the appropriate subclassed Error type
    • Sensible defaults for our API ({json:true}, etc)

    defaults()

    Curried version of request() that produces an http client with overridden defaults.

    HttpError

    Child of Error (by way of Exception from @ciscospark/common). Has subclassed errors for each official HTTP status code (and 429 Too Man Requests).

    Maintainers

    This package is maintained by Cisco Webex for Developers.

    Contribute

    Pull requests welcome. Please see CONTRIBUTING.md for more details.

    License

    © 2016-2018 Cisco and/or its affiliates. All Rights Reserved.

    Keywords

    none

    Install

    npm i @ciscospark/http-core

    DownloadsWeekly Downloads

    517

    Version

    1.52.2

    License

    MIT

    Unpacked Size

    172 kB

    Total Files

    39

    Last publish

    Collaborators

    • webex-jenkins
    • adamweeks