Skip to main content

Using a REST service to accept HTTP POST requests in an HTML form

This scenario applies only to Talend ESB, Talend Data Services Platform, Talend MDM Platform, Talend Real Time Big Data Platform, and Talend Data Fabric.

For more technologies supported by Talend, see Talend components.

This scenario describes how to upload data to a REST service using HTTP POST in a HTML form file. To do so, a Job is created to accept HTTP POST requests using the tRESTRequest component.

A predefined HTML form UploadFile.html is used to upload data to the REST service:

<form action="http://localhost:8088/UserInfo" method="post" enctype="multipart/form-data">
	<input type="file" name="id" />
	<button>upload</button>
</form>

The customer.xml that contains a user ID will be uploaded:

  <customer>
    <id>100</id>
  </customer>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!