Home » U++ Library support » U++ MT-multithreading and servers » HttpRequest, Content-ID header in Part method
Re: HttpRequest, Content-ID header in Part method [message #44564 is a reply to message #44563] |
Tue, 31 March 2015 21:29   |
Zbych
Messages: 327 Registered: July 2009
|
Senior Member |
|
|
Hi Sergey,
You are right. Probably we need more generic Part method with headers defined by a user. Maybe something like this:
HttpRequest& HttpRequest::Part(const Vector<String>& header, const String& data,
const char *content_type)
{
if(IsNull(multipart)) {
POST();
multipart = AsString(Uuid::Create());
if (content_type && *content_type)
ContentType(String(content_type) + "; boundary=" + multipart);
else ContentType("multipart/form-data; boundary=" + multipart);
}
postdata << "--" << multipart << "\r\n";
for (int i = 0; i < header.GetCount(); i++){
postdata << header[i] << "\r\n";
}
postdata << "\r\n" << data << "\r\n";
return *this;
}
[Updated on: Thu, 02 April 2015 10:23] Report message to a moderator
|
|
|
 |
|
HttpRequest, Content-ID header in Part method
By: Zbych on Tue, 31 March 2015 10:51
|
 |
|
Re: HttpRequest, Content-ID header in Part method
|
 |
|
Re: HttpRequest, Content-ID header in Part method
By: Zbych on Tue, 31 March 2015 21:29
|
 |
|
Re: HttpRequest, Content-ID header in Part method
By: mirek on Sat, 04 April 2015 09:42
|
 |
|
Re: HttpRequest, Content-ID header in Part method
|
 |
|
Re: HttpRequest, Content-ID header in Part method
By: Zbych on Tue, 07 April 2015 11:02
|
Goto Forum:
Current Time: Mon Jun 23 11:52:25 CEST 2025
Total time taken to generate the page: 0.04238 seconds
|