isomorphic-form-data

WebJar for isomorphic-form-data

License

License

MIT
Categories

Categories

Data ORM
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

isomorphic-form-data
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

isomorphic-form-data
WebJar for isomorphic-form-data
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/form-data/isomorphic-form-data

Download isomorphic-form-data

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/isomorphic-form-data/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>isomorphic-form-data</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/isomorphic-form-data/
implementation 'org.webjars.npm:isomorphic-form-data:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/isomorphic-form-data/
implementation ("org.webjars.npm:isomorphic-form-data:2.0.0")
'org.webjars.npm:isomorphic-form-data:jar:2.0.0'
<dependency org="org.webjars.npm" name="isomorphic-form-data" rev="2.0.0">
  <artifact name="isomorphic-form-data" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='isomorphic-form-data', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "isomorphic-form-data" % "2.0.0"
[org.webjars.npm/isomorphic-form-data "2.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : form-data jar [2.3.2,3)

Project Modules

There are no modules declared in this project.

A library to create readable "multipart/form-data" isomorphically in node and the browser.

Install

npm install isomorphic-form-data

Usage

In this example we are constructing a form with 3 fields that contain a string, a buffer and a file stream.

require('isomorphic-form-data');
var fs = require('fs');

var form = new FormData();
form.append('my_field', 'my value');
form.append('my_buffer', new Buffer(10));
form.append('my_file', fs.createReadStream('/foo/bar.jpg'));

node-fetch

You can submit a form using node-fetch:

var form = new FormData();

form.append('a', 1);

fetch('http://example.com', { method: 'POST', body: form })
    .then(function(res) {
        return res.json();
    }).then(function(json) {
        console.log(json);
    });

License

Form-Data is licensed under the MIT license.

org.webjars.npm

FormData

A library to create readable "multipart/form-data" streams.

Versions

Version
2.0.0
0.0.1