# HTTP requests

<div align="left"><figure><img src="/files/ZfYYUV8XMVEVzzYMMzcu" alt=""><figcaption></figcaption></figure></div>

Use the HTTP request step to make an HTTP request and assign its response to a target variable.

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

### Adding Headers

You can add any number of headers values to your HTTP request by using the add header button.

Only Latin characters, the digits 0-9 and "-" can be used for a header name. Header value can either be written as text or using variables that exists in the app.&#x20;

You can test out different configuration of HTTP headers by disabling and/or enabling only some of the HTTP headers for the step.

It's important to recognize that further headers may also be added when using a non-client execution context.

### Adding Request Body

You are able to edit the Request Body to use either a text variable, binary variable or a JSON expression.

If the HTTP call is a GET, HEAD or DELETE then the Request Body will not be sent with the HTTP request.

### Handling Response

You can set the if you want the contents of the response to be typed as either text, binary or as JSON.

If you are expecting the content of the response to be JSON you can write a [type expression](/flow-connect/reference/reference/flowscript/walkthrough/custom-types.md) matching the expected type, or infer it from a JSON value.&#x20;

Inferring the result type from JSON objects might create a expected response FlowScript type that contain either [null ](/flow-connect/reference/reference/flowscript/walkthrough/nullable-types.md)or [nothing ](/flow-connect/reference/reference/flowscript/walkthrough/other-types.md)in some fields. This might cause issues when running the application containing the HTTP request step. To avoid such issues, either remove these fields or replace them with the correct [nullable](/flow-connect/reference/reference/flowscript/walkthrough/nullable-types.md) or sequence type.

You are also able to choose whether an error status should cause a the application to stop (displaying an error message to the user) or if you want to handle the error manually.

If the HTTP request is configued with the HEAD or DELETE verbs then the response will not contain a response content, and any response configuration will be ignored.

### Advanced

Should you want to edit the HTTP request further you can use the Copy as Flowscript button to get a equivalent FlowScript code which can be edited further in a [script step](/flow-connect/reference/reference/designer/steps/script-item.md).


---

# Agent Instructions: 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:

```
GET https://docs.novacura.com/flow-connect/reference/reference/designer/steps/http-requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
