mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
17 lines
465 B
C++
17 lines
465 B
C++
#ifndef HTTPCLIENT_H__
|
|
#define HTTPCLIENT_H__
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace HttpClient {
|
|
|
|
/// Download the given URL into "outBody".
|
|
/// Returns true if the download completed successfully (HTTP 200) and the body is in outBody.
|
|
/// This function supports plain HTTP only (no TLS). It will follow up to 3 redirects.
|
|
bool download(const std::string& url, std::vector<unsigned char>& outBody);
|
|
|
|
} // namespace HttpClient
|
|
|
|
#endif /* HTTPCLIENT_H__ */
|