multipart-payload-transformer

WebJar for multipart-payload-transformer

License

License

Categories

Categories

CLI User Interface ORM Data
GroupId

GroupId

org.webjars.bowergithub.advanced-rest-client
ArtifactId

ArtifactId

multipart-payload-transformer
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

multipart-payload-transformer
WebJar for multipart-payload-transformer
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/advanced-rest-client/multipart-payload-transformer

Download multipart-payload-transformer

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/multipart-payload-transformer/ -->
<dependency>
    <groupId>org.webjars.bowergithub.advanced-rest-client</groupId>
    <artifactId>multipart-payload-transformer</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/multipart-payload-transformer/
implementation 'org.webjars.bowergithub.advanced-rest-client:multipart-payload-transformer:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/multipart-payload-transformer/
implementation ("org.webjars.bowergithub.advanced-rest-client:multipart-payload-transformer:2.0.0")
'org.webjars.bowergithub.advanced-rest-client:multipart-payload-transformer:jar:2.0.0'
<dependency org="org.webjars.bowergithub.advanced-rest-client" name="multipart-payload-transformer" rev="2.0.0">
  <artifact name="multipart-payload-transformer" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.advanced-rest-client', module='multipart-payload-transformer', version='2.0.0')
)
libraryDependencies += "org.webjars.bowergithub.advanced-rest-client" % "multipart-payload-transformer" % "2.0.0"
[org.webjars.bowergithub.advanced-rest-client/multipart-payload-transformer "2.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

Published on NPM

Build Status

Published on webcomponents.org

multipart-payload-transformer

An element to transform FormData object into Multipart message and ArrayBuffer.

Usage

Installation

npm install --save @advanced-rest-client/multipart-payload-transformer

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/code-mirror/code-mirror.js';

class SampleElement extends PolymerElement {
  render() {
    const formData = new FormData();
    formData.add('filed', new Blob(['test'], { type: 'text/plain' }));
    return html`
    <multipart-payload-transformer .formData="${formData}"></multipart-payload-transformer>
    `;
  }

  async run() {
    const message = await this.shadowRoot.querySelector('multipart-payload-transformer').generateMessage();
    console.log(message);
  }
}
customElements.define('sample-element', SampleElement);

In a Polymer 3 element

import {PolymerElement, html} from '@polymer/polymer';
import '@advanced-rest-client/multipart-payload-transformer/multipart-payload-transformer.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <multipart-payload-transformer formdata="[[formData]]"></multipart-payload-transformer>
    `;
  }

  static get properties() {
    return {
      formData: Object
    }
  }

  constructor() {
    super();
    const fd = new FormData();
    fd.add('test', 'value');
    this.formData = fd;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/multipart-payload-transformer
cd multipart-payload-transformer
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem

org.webjars.bowergithub.advanced-rest-client

ARC

A set of repositories related to the Advanced REST Client and API console (by Mulesoft)

Versions

Version
2.0.0