Summer Sales 20 Off for Piotnet Addons & Piotnet Forms
HIDE

Remote Request

Remote Request feature of Piotnet helps to send data collected by your form to an URL endpoint – a remote server.

Tutorials to configure Remote Request action

What is Remote Request?

Remote Request is sending requests to a remote server by HTTP protocol request methods. There are many HTTP Methods: GET, POST, PUT, PATCH, DELETE.
To deeply understand HTTP Methods, you need to cover the knowledge about Client-server architectureAPI.

Anatomy of an HTTP Request
An HTTP Request must have the following: a HTTP method (like GET or POST), a host URL, an endpoint path.
A request can also optionally have: body, headers, query strings, HTTP version.

HTTP Methods

  1. POST: Use to create a new resource
  2. GET: Use to read or retrieve a resource
  3. PUT: Use to modify a resource
  4. PATCH: Use to modify part of a resource
  5. DELETE: Use to delete a resource

Remote Request feature in Piotnet

In Piotnet Forms, we provide Remote Request feature as an Action After Submit. By the action, you can select which data to collect from your form and send to remote server.

Edit Submit Button -> Select Action After Submit: Remote Request

In Remote Request Control section, setup your HTTP Request:

  1. URL: enter your endpoint URL
  2. Request Arguments: define request Method, request timeout, redirection, httpversion, blocking.
  3. Header Arguments: enter content-type, x-powered-by, accept, api-key.
  4. Body Arguments: enter body parameters which you want to collect from the form and send to the endpoint URL. The Parameters are shortcode of the fields.
    “Add Item” to add one or many argument parameters. 
remote request 1

Now your Remote request form is ready. If anyone fill and submit the form, data will be collected and sent to endpoint.

Remote Request Example in Piotnet Forms

In this example, we collect email from a simple form and send to Sendinblue to create a new contact by Remote Request POST method.

Sendinblue is a CRM which manages client contacts. We also integrated Sendinblue in Piotnet Forms: Sendinblue Integration.

remote request 2

Requirement from Sendinblue

Setup Remote Request action after submit

Now Edit Submit button, open Remote Request section and enter argument parameters:

  1. URL: https://api.sendinblue.com/v3/contacts
  2. Request Arguments: method  = POST
  3. Header Arguments: Accept = application/json; Content-type = application/json; api-key = the api-key generated by our Sendinblue account
  4. Body Arguments: email = email-field-shortcode
remote request 3
remote request 4
remote request 5

At this point, we already completed the setup. Let’s see how do the Remote Request Form work:

– Enter contact email

remote request 6

Click Submit button -> Check the Contacts in Sendinblue

remote request 7
As you can see, the contact was added into Sendinblue

Conclusion

Remote Request in an advanced feature which requires coding knowledge. Just consider to use the feature in case you clearly understand HTTP protocol, API, Client-server Architecture.