> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/pipes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/pipes/valves/http/post.md).

# POST

## Introduction

Valve for performing HTTP POST requests.

## Configuration

{% hint style="info" %}
**Valve name:** `HttpPost`
{% endhint %}

Common HTTP valve configuration can be found [here](/pipes/valves/http.md).

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="186">Name</th><th>Description</th><th>Default value</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td><code>content_type</code></td><td>Media type of content. </td><td>N/A</td><td>true</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
  "name" : "HttpPost",
  "config" : {
    "url" : "http://127.0.0.1:8080/echo",
    "destination" : "default",
    "parameters" : {
      "param_1_name" : "param_1_value",
      "param_2_name" : "param_2_value"
    },
    "headers" : {
      "X-Timestamp" : "2022-08-30T12:05:46.607408Z"
    },
    "content_type" : "application/x-www-form-urlencoded"
  }
}
```

{% endtab %}
{% endtabs %}

### Example for posting form data

```json
{
    "name": "HttpPost",
    "config": {
        "url": "https://demo1827626.mockable.io/tenant1/oauth2/v2.0/token",
        "destination": "default",
        "parameters": {
            "client_id": "myid",
            "scope": "https%3A%2F%2Ftest.tenant1%2F.default",
            "client_secret": "mysecret",
            "grant_type": "client_credentials"
        },
        "content_type": "application/x-www-form-urlencoded"
    }
}
```

### Example for posting JSON data

```json
{
    "name": "HttpPost",
    "config": {
        "url": "https://demo1827626.mockable.io/tenant1/customers/find",
        "destination": "default",
        "content": {
            "personalIdentityNumber": "${request.ssn}"
        },
        "headers": {
            "Authorization": "Bearer ${state.body.access_token}"
        },
        "content_type": "application/json"
    }
}
```
