---
id: "M:cAlgo.API.HttpResponseHeaders.GetEnumerator"
kind: "method"
type: "T:cAlgo.API.HttpResponseHeaders"
url: "https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/GetEnumerator/"
---

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

# HttpResponseHeaders.GetEnumerator

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

## GetEnumerator()

Returns an enumerator that iterates through `HttpResponseHeaders`.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
```

Python:

```python
httpResponseHeaders.GetEnumerator() -> IEnumerator[KeyValuePair[str, str]]
```

### Returns

`IEnumerator<KeyValuePair<string, string>>` — 

### Examples

C#:

```csharp
var response = Http.Get("https://api.example.com/quotes/EURUSD");
using var enumerator = response.Headers.GetEnumerator();
while (enumerator.MoveNext())
    Print("{0}: {1}", enumerator.Current.Key, enumerator.Current.Value);
```

Python:

```python
response = api.Http.Get("https://api.example.com/quotes/EURUSD")
enumerator = response.Headers.GetEnumerator()
while enumerator.MoveNext():
    api.Print(f"{enumerator.Current.Key}: {enumerator.Current.Value}")
```

