Wondering what’s next for npm?Check out our public roadmap! »

    @shopify/network
    TypeScript icon, indicating that this package has built-in type declarations

    1.6.4 • Public • Published

    @shopify/network

    Build Status Build Status License: MIT npm version npm bundle size (minified + gzip)

    Common values related to dealing with the network.

    Installation

    $ yarn add @shopify/network

    Usage

    Import any of the enums or functions in this package to get a friendly API to common network details. The following values are exposed from this library:

    • Method: enum for HTTP methods
    • StatusCode: enum for HTTP status codes (mapping from name to number)
    • ResponseType: response type enum (2xx, 3xx, etc)
    • Header: enum for common header names
    • CspDirective: enum for names of content security policy directives
    • CspSandboxAllow: enum for values allowed in the CSP sandbox directive
    • SpecialSource: enum for "special" (non-URI) sources usable in many CSP directives
    • nonceSource(): function for generating nonce sources in CSP directives
    • getResponseType: returns the ResponseType for an HTTP status code
    • HashAlgorithm: enum for hash algorithms usable in several CSP directives
    • hashSource(): function for generating hash sources in CSP directives

    Keywords

    none

    Install

    npm i @shopify/network

    DownloadsWeekly Downloads

    92,523

    Version

    1.6.4

    License

    MIT

    Unpacked Size

    61.4 kB

    Total Files

    21

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar