---
id: "M:cAlgo.API.HttpResponseHeaders.GetValue(System.String)"
kind: "method"
type: "T:cAlgo.API.HttpResponseHeaders"
url: "https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/GetValue/"
---

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

# HttpResponseHeaders.GetValue

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

## GetValue(string name)

Returns an existing header value.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public string GetValue(string name)
```

Python:

```python
httpResponseHeaders.GetValue(name: str) -> str
```

### Parameters

- `name` (`string`, Python `str`): The Header name

### Returns

`string` — The Header value if the header is successfully found; otherwise, an empty string.

### Examples

C#:

```csharp
var response = Http.Get("https://api.example.com/quotes/EURUSD");
var contentType = response.Headers.GetValue("Content-Type");
if (contentType.Contains("json"))
    Print("JSON response: {0}", response.Body);
```

Python:

```python
response = api.Http.Get("https://api.example.com/quotes/EURUSD")
contentType = response.Headers.GetValue("Content-Type")
if "json" in contentType:
    api.Print(f"JSON response: {response.Body}")
```

