@shopify/network
![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/network.svg)
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 methodsStatusCode
: enum for HTTP status codes (mapping from name to number)Header
: enum for common header namesCspDirective
: enum for names of content security policy directivesCspSandboxAllow
: enum for values allowed in the CSP sandbox
directiveSpecialSource
: enum for "special" (non-URI) sources usable in many CSP directivesnonceSource()
: function for generating nonce sources in CSP directivesHashAlgorithm
: enum for hash algorithms usable in several CSP directiveshashSource()
: function for generating hash sources in CSP directives