@shopify/network
v3.3.0
Published
Common values related to dealing with the network
Downloads
883,483
Keywords
Readme
@shopify/network
Common values related to dealing with the network.
Installation
yarn add @shopify/networkUsage
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)ResponseType: response type enum (2xx, 3xx, etc)Header: enum for common header namesCspDirective: enum for names of content security policy directivesCspSandboxAllow: enum for values allowed in the CSPsandboxdirectiveSpecialSource: enum for "special" (non-URI) sources usable in many CSP directivesnonceSource(): function for generating nonce sources in CSP directivesgetResponseType: returns theResponseTypefor an HTTP status codeHashAlgorithm: enum for hash algorithms usable in several CSP directiveshashSource(): function for generating hash sources in CSP directives
