# HTTP

YuDash IoT devices support data push through REST POST API. Both HTTP and HTTPS (SSL) are supported.

**HTTP** is the default TCP/IP protocol for cloud communication. YuDash LYNX supports POST REST API for sending data to HTTP Server. The HTTP headers can be configured to support  various authentication types.&#x20;

Following are the settings in LYNX to configure connection to HTTP server:

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2F5EjuYeSBJ83LzOftcKvX%2Fyudash_http.jpg?alt=media&#x26;token=5347b041-79d2-4851-8b04-ee95cab715cb" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="215">HTTP Parameter</th><th>Description</th></tr></thead><tbody><tr><td>HTTP Server</td><td><p></p><p>The URL of HTTP server is faccessible on the network. Alternately, unique IP address can be provided. This may be required for a local deployment.</p><ul><li>Remove any prefixes (http:// or https://) in the server name.</li><li>Remove any suffix APIs from server name. They are provided in API below.</li></ul></td></tr><tr><td>HTTP API</td><td>The API name (similar to subdirectory) which will accept POST request. This will typically start with "/".</td></tr><tr><td>HTTP Port</td><td>The port on which HTTP server is running.</td></tr><tr><td>HTTP Success Code</td><td>Success code REST API. This is used to check if POST command by IoT device was success or failure. This value has to be set as per cloud API. </td></tr><tr><td>HTTP SSL Enabled</td><td>Check this box for enabling HTTPS using SSL. This is recommended for production applications.</td></tr></tbody></table>

### **HTTP Headers for Authentication**

1. HTTP supports various authentication options. The authentication header keys and values are filled in section.&#x20;
   * These are sent as HTTP headers to server for handshake.
   * The UI supports two headers. In case multiple custom headers are required, it can be configured in JSON configuration.&#x20;

### &#x20;Device headers with HTTP Payload

In many HTTP servers, there may be single API accepting inputs from various sensors. So, it may be sharing credentials across a set of devices. In such cases, additional device information (say, machine name, sensorID, user-name) may have to be passed in JSON payload. This is besides the actual real-time data collected from sensors. For this requirement, there is an option to add device headers in JSON formats.

### SSL/TLS secure communication with HTTP

YuDash IoT devices support HTTP with SSL/TLS secure communication. Refer to [SSL/TLS for HTTP ](https://docs.yudash.com/device-to-cloud-api/ssl-tls#ssl-tls-for-http)documentation.

## LYNX Display with HTTP Post

Following are the typical LYNX display screens with HTTP POST

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FD8ifFUkSGOZtz9nP1u1x%2Fhttp1.jpg?alt=media&#x26;token=51858108-2927-4d96-9f3d-d224b8990d15" alt=""><figcaption><p>LYNX attempting HTTP POST to a given API on port 443</p></figcaption></figure>

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2F2Ukh4GKJRdOA5DTxIHyJ%2Fhttp2.jpg?alt=media&#x26;token=c9f5abfc-a6bd-4954-8a1c-c4666fe297ee" alt=""><figcaption><p>LYNX waiting for response from HTTP server</p></figcaption></figure>

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FZhpH9pNmK1sZQuE1dSj9%2Fhttp3.jpg?alt=media&#x26;token=2b79550b-87f2-4b9d-808f-164708d6952d" alt=""><figcaption><p>LYNX received HTTP response of 200, which matched with success code of 200</p></figcaption></figure>
