Skip to content

Popsicle transport for sending requests over `XMLHttpRequest`

License

Notifications You must be signed in to change notification settings

serviejs/popsicle-transport-xhr

Repository files navigation

Popsicle Transport XHR

NPM version NPM downloads Build status Test coverage

Popsicle transport for sending requests over XMLHttpRequest.

Installation

npm install popsicle-transport-xhr --save

Usage

import { transport } from "popsicle-transport-xhr";

const req = new Request("/");
const res = await transport()(req, done);

Transport Options

The transport function sends the Servie Request to a remote server.

  • type?: XMLHttpRequestResponseType Override response type
  • withCredentials?: boolean Enable withCredentials
  • overrideMimeType?: string Override MIME type

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

MIT

About

Popsicle transport for sending requests over `XMLHttpRequest`

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published