---
id: "M:cAlgo.API.Http.Send(cAlgo.API.HttpRequest)"
kind: "method"
type: "T:cAlgo.API.Http"
url: "https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Send/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Http.Send

Member of [Http](https://help.ctrader.com/ctrader-algo/references/HTTP/Http/index.md).

## Send(HttpRequest request)

Performs a request to the specified URI. The request method depends on the value of the `request.Method` property.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown.

C#:

```csharp
HttpResponse Send(HttpRequest request)
```

Python:

```python
api.Http.Send(request: HttpRequest) -> HttpResponse
```

### Parameters

- `request` (`HttpRequest`, Python `HttpRequest`): The `HttpRequest` object representing the request contents.

### Returns

`HttpResponse` — The `HttpResponse` object representing the result of the request.

### Examples

C#:

```csharp
var request = new HttpRequest(new Uri("https://api.example.com/signals"))
{
    Method = HttpMethod.Post,
    Body = "EURUSD buy"
};
var response = Http.Send(request);
Print("Status code: {0}", response.StatusCode);
```

Python:

```python
from System import Uri

request = HttpRequest(Uri("https://api.example.com/signals"))
request.Method = HttpMethod.Post
request.Body = "EURUSD buy"
response = api.Http.Send(request)
api.Print(f"Status code: {response.StatusCode}")
```

