mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: HttpRequest now supports alternate method name
git-svn-id: svn://ultimatepp.org/upp/trunk@5977 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
1aad3e7bd8
commit
024a16aedc
4 changed files with 18 additions and 7 deletions
|
|
@ -52,6 +52,13 @@ HttpRequest::HttpRequest(const char *url)
|
|||
Url(url);
|
||||
}
|
||||
|
||||
HttpRequest& HttpRequest::Method(int m, const char *custom_name)
|
||||
{
|
||||
method = m;
|
||||
custom_method = custom_name;
|
||||
return *this;
|
||||
}
|
||||
|
||||
HttpRequest& HttpRequest::Url(const char *u)
|
||||
{
|
||||
ssl = memcmp(u, "https", 5) == 0;
|
||||
|
|
@ -458,7 +465,7 @@ void HttpRequest::StartRequest()
|
|||
"GET", "POST", "HEAD", "PUT", "DELETE", "TRACE", "OPTIONS", "CONNECT", "PATCH",
|
||||
};
|
||||
ASSERT(method >= 0 && method <= 8);
|
||||
data = smethod[method];
|
||||
data = Nvl(custom_method, smethod[method]);
|
||||
data << ' ';
|
||||
String host_port = host;
|
||||
if(port)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue