# Response Arguments

Below is a list of arguments that can be accessed in controller and view responses.

The response arguments are almost the same for controller functions and template views, with one difference: views use the `data` argument instead of `request`. Keep that in mind when reviewing the list below:

### props

This is the object data passed to your template file. It contains information that helps to render the view with dynamic data

*This argument is only accessible by template views.*

### http

This argument provides access to request-related information. For example, consider a request with the URI path `/product/72/chesterfield`:

This argument provides access to request-related information and is used primarily within controller functions.

*This argument is only accessible by controller functions*

```json
{
    "verb": "GET",
    "status": 200,
    "path": ["product", "72", "chesterfield"],
    "vars": {
        "page": "product",
        "id": "72",
        "slug": "chesterfield"
    },
    "form": {},
    "request": {
        "get": "URLSearchParams",
        "post": {}
    }
    "response": {} // If returns a ajax response
}
```

* **verb:** The HTTP method (GET or POST).
* **status:** The HTTP status code (200, 404, or 405).
* **path:** The URI path as an array.
* **vars:** An object mapping path segments to keys.
* **form:** Captures submitted DOM form elements.
* **request.get:** An instance of URLSearchParams for GET requests.
* **request.post:** An object for POST requests.
* **response**: Will propagate if a possible fetch (Ajax) response.

### container

The container can be used to communicate with your template and the outside. You can create your own or access the frameworks functions like bellow.

```javascript
const dispath = container.get("dispatch");
dispath.navigateTo("#about");
```

### helper

Your own possible helper libraries, objects, and functions you passed in the configuration.

### context

Access the Stratox builder context library (you can manage without, only for advanced users; more on this later on).


---

# 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://stratox.wazabii.se/configs/response-arguments.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.
