# HTTP

## Routing

Routing allows you to create custom pages in Saturn.

```php
use Saturn\HTTPManager\Router;
$Router = new Router();

//GET
$Router->GET('/myroute', '/Plugins/MyPlugin/MyFile.php');
// POST
$Router->POST('/myformpost', '/Plugins/MyPlugin/MyFile.php');
```

## Response

Response allows you to quickly and easily send HTTP responses in PHP. The functions modify the headers sent by PHP then terminate the script.

```php
use Saturn\HTTPManager\Response;
$Response = new Response();

// Send HTTP 500
$Response->HTTP500();

// Send HTTP 405
$Response->HTTP405();

// Send HTTP 404
$Response->HTTP404();

// Send HTTP 403
$Response->HTTP403();
```


---

# 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.saturncms.net/1.0.0/dev/libraries-and-functions/http.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.
