Web: HttpClient::Header

git-svn-id: svn://ultimatepp.org/upp/trunk@4066 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-10-20 08:52:48 +00:00
parent bd932cd563
commit c2ff5c1e85
3 changed files with 8 additions and 1 deletions

View file

@ -193,6 +193,12 @@ String HttpClient::CalculateDigest(String authenticate) const
return auth;
}
HttpClient& HttpClient::Header(const char *id, const String& data)
{
client_headers << id << ": " << data << "\r\n";
return *this;
}
String HttpClient::Execute(Gate2<int, int> progress)
{
int start_time = msecs();

View file

@ -27,6 +27,7 @@ public:
HttpClient& Headers(String h) { client_headers = h; return *this; }
HttpClient& ClearHeaders() { return Headers(Null); }
HttpClient& AddHeaders(String h) { client_headers.Cat(h); return *this; }
HttpClient& Header(const char *id, const String& data);
HttpClient& StdHeaders(bool sh) { std_headers = sh; return *this; }
HttpClient& NoStdHeaders() { return StdHeaders(false); }

View file

@ -1,7 +1,7 @@
#ifndef _Web_icpp_init_stub
#define _Web_icpp_init_stub
#include "Core/init"
#define BLITZ_INDEX__ FA92DBD526633AD7AAEAF19E571AEF34F
#define BLITZ_INDEX__ FC6F975A86E4E6CFB52E673E128BCEAC9
#include "Web_init.icpp"
#undef BLITZ_INDEX__
#endif