# j-FormData

> Con questo componente è possibile inviare i dati tramite il metodo POST/PUT/DELETE alla finestra corrente o ad un altro.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: it
Content-SHA256: 4c358fd5e24cc0ec59b902886dcf436975f6bdf062c6388818dc5d14b49906c9
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

Con questo componente è possibile inviare i dati tramite il metodo POST/PUT/DELETE alla finestra corrente o ad un altro.

- singolo

### Configurazione

- `method {String}` è un metodo HTTP predefinito (predefinita: `POST`)
- `target {String}` un obiettivo predefinito (predefinita: `_blank`)
- `type {String}` un tipo di modulo predefinito (default: `application/x-www-form-urlencoded`)

### Metodi

- `component.send(opt)`
	- Metodo di formula `opt.method {String}`, standard `config.method`
	- L’obiettivo è `opt.target {String}`, standard `config.target`.
	- Tipo di modulo `opt.type {String}`, standard `config.target`
	- `opt.url {String}` URL richiesto
	- `opt.data {Object}` __requieto__ dati di modulo nel modulo `{ key1:value, key2:value }`

Utilizzare con `<ui-component name="formdata">`Quando il componente non è ancora caricato, jComponent Scarica il codice in prima utilizzazione dall'indirizzo `DEF.fallback` (Il Componentator La storia di Peter Širka.Fonte: il Componentator Ristorante dei componenti, licenza MIT.

```html example.html
<ui-component name="LAZY formdata"></ui-component>
<button>Send data</button>

<script>

	$(document).on('click', 'button', function() {
		SETTER('formdata/send', { url: 'http://127.0.0.1:8000/api/', data: { name: 'Total.js Platform' }});
	});

</script>
```
