options

HTTP options request.

T[]
options
(
T = char
)
(
const(char)[] url
,
HTTP conn = HTTP()
)
if (
is(T == char) ||
is(T == ubyte)
)

Parameters

url const(char)[]

resource make a option call to

conn HTTP

connection to use e.g. FTP or HTTP. The default AutoProtocol will guess connection type and create a new instance for this call only.

The template parameter T specifies the type to return. Possible values are char and ubyte to return char[] or ubyte[].

Return Value

Type: T[]

A T[] range containing the options of the resource pointed to by the URL.

Examples

import std.net.curl;
auto http = HTTP();
options("https://httpbin.org/headers", http);
writeln("Allow set to " ~ http.responseHeaders["Allow"]);

See Also

Meta

Suggestion Box / Bug Report