The OpenD Programming Language

HTTP.addRequestHeader

Add a header e.g. "X-CustomField: Something is fishy".

There is no remove header functionality. Do a clearRequestHeaders and set the needed headers instead.

struct HTTP
void
addRequestHeader
(
const(char)[] name
,
const(char)[] value
)

Examples

import std.net.curl;
auto client = HTTP();
client.addRequestHeader("X-Custom-ABC", "This is the custom value");
auto content = get("dlang.org", client);

Meta