Restyle
This commit is contained in:
parent
5b79f296d6
commit
fccf66fba2
280 changed files with 56975 additions and 71885 deletions
|
@ -1,6 +1,6 @@
|
|||
#include "http_parser.h"
|
||||
#include "url.h"
|
||||
#include "socket.h"
|
||||
#include "url.h"
|
||||
#include "util.h"
|
||||
|
||||
namespace HTTP{
|
||||
|
@ -11,7 +11,8 @@ namespace HTTP{
|
|||
std::string &data();
|
||||
const std::string &const_data() const;
|
||||
void prepareRequest(const HTTP::URL &link, const std::string &method = "");
|
||||
void doRequest(const HTTP::URL &link, const std::string &method = "", const void * body = 0, const size_t bodyLen = 0);
|
||||
void doRequest(const HTTP::URL &link, const std::string &method = "", const void *body = 0,
|
||||
const size_t bodyLen = 0);
|
||||
void doRequest(const HTTP::URL &link, const std::string &method, const std::string &body);
|
||||
bool get(const std::string &link, Util::DataCallback &cb = Util::defaultDataCallback);
|
||||
bool get(const HTTP::URL &link, uint8_t maxRecursiveDepth = 6, Util::DataCallback &cb = Util::defaultDataCallback);
|
||||
|
@ -20,7 +21,8 @@ namespace HTTP{
|
|||
Util::DataCallback &cb = Util::defaultDataCallback);
|
||||
bool getRangeNonBlocking(const HTTP::URL &link, size_t byteStart, size_t byteEnd,
|
||||
Util::DataCallback &cb = Util::defaultDataCallback);
|
||||
bool post(const HTTP::URL &link, const void * payload, const size_t payloadLen, bool sync = true, uint8_t maxRecursiveDepth = 6);
|
||||
bool post(const HTTP::URL &link, const void *payload, const size_t payloadLen, bool sync = true,
|
||||
uint8_t maxRecursiveDepth = 6);
|
||||
bool post(const HTTP::URL &link, const std::string &payload, bool sync = true,
|
||||
uint8_t maxRecursiveDepth = 6);
|
||||
|
||||
|
@ -45,7 +47,7 @@ namespace HTTP{
|
|||
const Socket::Connection &getSocket() const;
|
||||
uint32_t retryCount, dataTimeout;
|
||||
bool isProxied() const;
|
||||
const HTTP::URL & lastURL();
|
||||
const HTTP::URL &lastURL();
|
||||
|
||||
private:
|
||||
bool isComplete;
|
||||
|
@ -54,7 +56,7 @@ namespace HTTP{
|
|||
uint32_t connectedPort; ///< Currently connected port number
|
||||
Parser H; ///< HTTP parser for downloader
|
||||
Socket::Connection S; ///< TCP socket for downloader
|
||||
bool ssl; ///< True if ssl is currently in use.
|
||||
bool ssl; ///< True if ssl is currently in use.
|
||||
std::string authStr; ///< Most recently seen WWW-Authenticate request
|
||||
std::string proxyAuthStr; ///< Most recently seen Proxy-Authenticate request
|
||||
bool proxied; ///< True if proxy server is configured.
|
||||
|
@ -65,8 +67,4 @@ namespace HTTP{
|
|||
uint64_t nbReqTime;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}// namespace HTTP
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue