# @bigcommerce/form-poster

> A JavaScript library for posting HTML form data

Latest version **1.5.3** (published 2025-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bigcommerce/form-poster
pnpm add @bigcommerce/form-poster
yarn add @bigcommerce/form-poster
bun add @bigcommerce/form-poster
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.5.3 |
| Published | 2025-05-01 |
| First published | 2018-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | bcnpmuser, icatalina, chris.boulton, davidchin, pascal.zajac, chanceaclark, jairobc, jmwiese, jorgemoya, cilo, toma-r, leebigcommerce |

## Links

- npm: https://www.npmjs.com/package/@bigcommerce/form-poster
- Repository: https://github.com/bigcommerce/form-poster-js
- Homepage: https://github.com/bigcommerce/form-poster-js#readme
- Issues: https://github.com/bigcommerce/form-poster-js/issues
- npm.io page: https://npm.io/package/@bigcommerce/form-poster

## Recent versions

- 1.5.3 (latest) — 2025-05-01
- 1.5.2 — 2025-02-22
- 1.5.0 — 2024-02-26
- 1.4.2 — 2024-01-16
- 1.4.0 — 2019-11-12
- 1.3.0 — 2018-11-14
- 1.2.3 — 2018-06-22
- 1.2.2 — 2018-05-28
- 1.2.1 — 2018-05-15
- 1.2.0 — 2018-05-15

## README

# form-poster

[![Build Status](https://travis-ci.com/bigcommerce/form-poster-js.svg?branch=master)](https://travis-ci.com/bigcommerce/form-poster-js)

This is a JavaScript library for making a POST request as if you are submitting a HTML form. The request will have `application/x-www-form-urlencoded` content-type header. This is useful in situations where you want the same behaviour as submitting a HTML form without actually having the form in DOM.

## Usage

You can install this package using npm or yarn. Below is an example of how to use it.

```js
import { createFormPoster } from 'form-poster';

const formPoster = createFormPoster();
const url = '/url/123';
const data = { field_1: 'foo', field_2: 'bar' };

formPoster.postForm(url, data, () => {
    console.log('done');
});
```

## Development

To install dependencies:

```sh
npm install
```

To transpile source code:

```sh
npm run build
```

To bump and tag a release:

```sh
npm run release
```

---
_Source: https://npm.io/package/@bigcommerce/form-poster · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
