ASL
HTTP clients and servers

Detailed Description

These classes enable creating servers and clients for the HTTP 1.1 protocol.

Additionally, there is functionality to create WebSocket clients and servers. Encrypted communication (HTTPS, TLS WebSocket) require the mbedTLS library and to enable the ASL_TLS Cmake option.

Use Http to send HTTP requests and receive the response.

HttpResponse resp = Http::get("http://someserver/something");
if (resp.ok())
{
String text = resp.text();
String type = resp.header("Content-Type");
}
static HttpResponse get(const String &url, const Dic<> &headers=Dic<>())
Sends an HTTP GET request for the given url and returns the response.
Definition: Http.h:535

Subclass HttpServer or WebSocketServer and implement the serve() function to create application-specific servers.

Classes

struct  Url
 The components of a URL plus some utility static functions. More...
 
class  HttpMessage
 Base class of HttpRequest and HttpResponse with common functionality. More...
 
class  HttpRequest
 An HTTP request that servers can read from. More...
 
class  HttpResponse
 An HTTP response that clients can read and servers write. More...
 
class  Http
 This class contains the basic HTTP/HTTPS client functionality. More...
 
class  HttpServer
 This class can be used to create application-specific HTTP servers. More...
 
class  WebSocket
 This class represents a WebSocket. More...
 
class  WebSocketServer
 This class can be used to create WebSocket servers. More...