Skip to main content

send()

sends a form to the server

send(url: string, method?: string, asFormData?: boolean): Promise<any> | void;

Parameters:

  • url: string - the URL of the server
  • method: string - the request type, "POST" by default
  • asFormData: boolean - optional, defines whether values of Form controls should be sent as Form Data

Returns:

An object of the promise.

Example

const send = form.send("myserver.com", "POST");

The method parameter can take "PUT", "POST", "DELETE", "GET" values, depending on the used type of the request.

Change log:

added in v6.1