1234567891011121314151617181920module juptune.http.client;
abstract class IHttpClient
{
/++ FUNCTIONS ++/
///
abstract Result close();
///
abstract Result connect(IpAddress ip);
///
abstract bool isConnected();
///
abstract Result request(HttpRequest request, HttpResponse response);
///
abstract HttpClientVersion selectedVersion();
///
abstract Result streamRequest(HttpRequest request, HttpResponse response, Result function(Result function(const const ubyte[] bodyChunk) putter) bodyPutter, Result function(HttpResponse statusAndHeaders, const const ubyte[] bodyChunk) bodyReader);
}
An interface for a HTTP client.
While Juptune is an @nogc-first library, it's silly to pretend that there's no place for GC-oriented code. Such code is likely to make use of OOP, so this interface is provided as a standard way to use a HTTP client.
Please use the documentation from HttpClientas it in almost all cases applies to this interface.
The only real difference is that IHttpClient.streamRequestcorresponds to HttpClient.streamRequestGC, since there's no real reason to expose the @nogc version.
| Name | Description |
|---|---|
| close | |
| connect | |
| isConnected | |
| request | |
| selectedVersion | |
| streamRequest |