arsd.http2

This is version 2 of my http/1.1 client implementation.

More...

Members

Classes

FormData
class FormData

Creates a multipart/form-data object that is suitable for file uploads and other kinds of POST

HttpApiClient
class HttpApiClient()

An experimental component for working with REST apis. Note that it is a zero-argument template, so to create one, use new HttpApiClient!()(args..) or you will get "HttpApiClient is used as a type" compile errors.

HttpClient
class HttpClient

Usage:

HttpRequest
class HttpRequest

When you send something, it creates a request and sends it asynchronously. The request object

Enums

HttpVerb
enum HttpVerb

Functions

get
HttpRequest get(string url)

auto request = get("http://arsdnet.net/"); request.send();

getText
string getText(string url)

gets the text off a url. basic operation only.

post
HttpRequest post(string url, string[string] req)

Do not forget to call waitForCompletion() on the returned object!

Structs

BasicAuth
struct BasicAuth
HttpCookie
struct HttpCookie
HttpRequestParameters
struct HttpRequestParameters
HttpResponse
struct HttpResponse
LinkHeader
struct LinkHeader
Uri
struct Uri

Detailed Description

It has no dependencies for basic operation, but does require OpenSSL libraries (or compatible) to be support HTTPS. Compile with -version=with_openssl to enable such support.

http2.d, despite its name, does NOT implement HTTP/2.0, but this shouldn't matter for 99.9% of usage, since all servers will continue to support HTTP/1.1 for a very long time.

Meta