> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/web-service-operations/web-service-list/set-header.md).

# Set header

This is a pre-built action located under the **WebService List** Element. It instructs the Avo Assure Client to set a request header for the WebService request. This ensures that necessary HTTP headers (such as content type, authorization, etc.) are included in API call.

## **Syntax**

**Input Value**: `<Request_header>`

| Argument                      | Description                                                                                                                                                                                                                                           |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \<Request\_header> (Required) | <p>Provide the request header that need to be included in the API request.</p><p><br><strong>Note</strong>: You can provide multiple header key value pairs, with each header specified on a new step in the <strong>Input Value</strong> column.</p> |

**Output Value**: `N/A`

| Argument | Description    |
| -------- | -------------- |
| N/A      | Not Applicable |

### **Example 1: Setting a Request Header in a WebService Request**

In this example, we explain how to add a header to a WebService request.

* **Action**: Set header
* **Input Value**: Content-Type: application/json
  * The argument (**Content-Type: application/json**) specifies the key and value of the request header.
* **Output Value**: N/A
  * This action does not require or store any output variable.
* **Logical Explanation**: The **Set header** action takes the value from the **Input Value** column (**Content-Type: application/json**) and adds the specified header to the WebService request.\
  The action assigns **application/json** as the value for the **Content-Type** request header.

<figure><img src="/files/jli5C1ypxn88aBhIaM5E" alt=""><figcaption></figcaption></figure>

### **Example 2: Setting Multiple Request Headers in a WebService Request**

In this example, we explain how to add multiple headers to a WebService request.

* **Action**: Set header
* **Input Value**:\
  Connection: true\
  Content-Type: application/json\
  X-vSRFTOKEN: 1YVIb63YPW6MU9CjGHQWxHM3FLM3KEFsAsjZular7XQALBhJgIBjxmZMIGZtKnzS
  * The first header step (**Connection: true**) specifies the connection behavior for the request.
  * The second header step (**Content-Type: application/json**) specifies that the request body is in **JSON** format.
  * The third header step (**X-vSRFTOKEN: 1YVIb63YPW6MU9CjGHQWxHM3FLM3KEFsAsjZular7XQALBhJgIBjxmZMIGZtKnzS**) specifies the security token used for request validation.
* **Output Value**: N/A
  * This action does not require or store any output variable.
* **Logical Explanation**: The **Set header** action reads each key value pair provided in the **Input Value** column and add them to the request header section. The action appends each header to the existing request headers before the WebService request is executed.&#x20;

{% hint style="info" %}
**Note**: Provide each header on a separate step in the **Input Value** column, as shown in the screenshot. Each step is treated as a separate header and appended to the request before execution.
{% endhint %}

<figure><img src="/files/KMj54FGw05HEwaFRyNOS" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/web-service-operations/web-service-list/set-header.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
