OpenTTD Source: NetworkHTTPSocketHandler Class Reference

OpenTTD Source 14.0-RC3

Static Public Member Functions
NetworkHTTPSocketHandler Class Reference

Base socket handler for HTTP traffic. More...

`#include <http.h>`

## Static Public Member Functions
static void | Connect (const std::string &uri, HTTPCallback *callback, const std::string data="")
| Connect to the given URI. More...
static void | HTTPReceive ()
| Do the receiving for all HTTP connections.

## Detailed Description

Base socket handler for HTTP traffic.

Definition at line 49 of file http.h.

## Member Function Documentation

## ◆ Connect()

void NetworkHTTPSocketHandler::Connect | ( | const std::string & | uri,
|  | HTTPCallback * | callback,
|  | const std::string | data = `""`
| ) |  |
| static

Connect to the given URI.

Parameters

  uri | the URI to connect to (https://.../..).
  callback | the callback to send data back on.
  data | the data we want to send. When non-empty, this will be a POST request, otherwise a GET request.

Definition at line 93 of file http_curl.cpp.

References lock, and HTTPCallback::OnFailure().

Referenced by ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP().

The documentation for this class was generated from the following files:

- src/network/core/http.h
- src/network/core/http_curl.cpp
- src/network/core/http_none.cpp
- src/network/core/http_winhttp.cpp