# Request Node

You can use a request node to execute a GET, POST, PUT and DELETE  request with proper request body and parameters.

Anything within double curly braces `{{ }}` is treated as a variable. Each request node takes two types of variables -&#x20;

### Pre-Request

These are the set of variables LOCAL to an API request and can be used by the API request before it fires. For Instance, you can define your url as `https://petstore3.swagger.io/api/v3/pet/{{petId}}` and then define a pre-request variable as shown below.

&#x20;A variable can of the following type -&#x20;

1. **Select** - Selects a part of the output from the previous node. For instance previous node is request node that outputs `{ "id": 10, "category" : [ {"id" : 10, "status" : "available"} ], .....}` , then you can use `petId = id` or `petId = category.0.id` The actual values will be calculated on the fly when the graph is run.
2. **String** - Assigns a value of type string to the variable.   `petId = "10"`
3. **Number** - Assigns a value of type number to the variable.   `petId = 10`
4. **Boolean** - Assigns a value of type boolean to the variable.   `petId = false`
5. **Now** - Assigns a value of type now() epoch timestamp to the variable. The value of now() is calculated on the fly during graph run.   `petId = Date.now()`

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

### Post-Response

Post response variables are GLOBAL and can be referenced by other downstream nodes. These are variables that are created after an API request has fired. One of the big advantages of these types of variable is that you can create a variable and assign it a value extracted from the response of an API request. For instance if the one node fired an API request, you can create a variable, assign it a value selected from it's response and use that in next node.

*If a node has a pre-request variable defined of the same name as post response variable of a previous node, it will take more precedence.*

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


---

# 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://flowtestai.gitbook.io/flowtestai/flow-nodes/request-node.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.
