Skip to content

HttpResponseHeaders

class cAlgo.API

DesktopCLICloud

The class that represents an HTTP response headers collection.

Definition

public sealed class HttpResponseHeaders

Namespace: cAlgo.API · Group: HTTP

Examples

var response = Http.Get("https://api.example.com/quotes/EURUSD");
Print("Content type: {0}", response.Headers.GetValue("Content-Type"));
foreach (var header in response.Headers)
    Print("{0}: {1}", header.Key, header.Value);
response = api.Http.Get("https://api.example.com/quotes/EURUSD")
api.Print(f"Content type: {response.Headers.GetValue('Content-Type')}")
for header in response.Headers:
    api.Print(f"{header.Key}: {header.Value}")

Methods

Name Description
GetEnumeratorDesktopCLICloudIEnumerator<KeyValuePair<string, string>> Returns an enumerator that iterates through HttpResponseHeaders.
GetValueDesktopCLICloudstring Returns an existing header value.

See also