# Http

This part provides extension methods for http-related stuff such as HttpContext and HttpRequest.

## HttpContext extensions

| Method name                          | Return type                               | Description                                                                          |
| ------------------------------------ | ----------------------------------------- | ------------------------------------------------------------------------------------ |
| GetIpAddress                         | `string`                                  | Gets IP-address common human-readable representation for remote target.              |
| GetAuthenticationSchemesAsync        | `Task<IEnumerable<AuthenticationScheme>>` | Gets available authentication schemes.                                               |
| IsSupportedAuthenticationSchemeAsync | `Task<bool>`                              | Determines whenever specified authentication scheme is available in current context. |

## HttpRequest extensions

| Method name    | Return type | Description                                                                             |
| -------------- | ----------- | --------------------------------------------------------------------------------------- |
| IsAjaxRequest  | `bool`      | Determines if request has ajax nature.                                                  |
| GetAbsoluteUri | `string`    | Gets an absolute Uri of request, combined from scheme, host name, port, path and query. |

## QueryCollection extensions

| Method name            | Return type            | Description                                                                                                                                          |
| ---------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| ToRouteValueDictionary | `RouteValueDictionary` | Creates an instance of `RouteValueDictionary` containing key-value pairs form specified `IQueryCollection` and appends new value with specified key. |


---

# 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.structr.dev/presentation/aspnetcore/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.
