コード例 #1
0
void 
RESTRepresentation::setSimpleContent( unsigned char *contentPtr, unsigned long contentLength )
{
    std::string contentType;

    getHTTPHeader( "Content-Type", contentType );

    setSimpleContent( contentType, contentPtr, contentLength ); 
}
コード例 #2
0
ファイル: HTTPRequest.cpp プロジェクト: dbxmm/http
int HTTPRequest::copyToFile(ofstream& ofs)
{
	size_t contentLength = atoi(getHTTPHeader("Content-Length").c_str());

	if (ofs.good())
	{
		ofs.write(m_requestBody.c_str(), contentLength);
	}

	if (ofs.bad())
		return -1;

	return 0;
}