17 namespace WebHandleCompletionCode
36 WebHandleCompletionCode::Values CompletionCode;
37 bool CanFallBackToCache;
42 : CompletionCode(WebHandleCompletionCode::Failed)
43 , CanFallBackToCache(
false)
44 , RetryPossible(
false)
49 typedef int TWebRequestHandleId;
54 WebRequestHandle(
const TWebRequestHandleId handleId,
const std::string& caCertFilePath);
57 CURL* GetCurlHandle()
const;
59 std::string GetUrl()
const;
60 bool IsCancelled()
const;
65 void AppendBodyData(Byte* data,
size_t size);
66 void AppendHeaderData(Byte* data,
size_t size);
71 TWebRequestHandleId GetHandleId()
const;
76 void SetupCurlOptions();
78 void WriteMultipartFormData();
79 void WriteMultipartFormField(curl_httppost** httpPost,
const std::string& fieldName,
const WebPostData& fieldData);
80 void WriteMultipartFormText(curl_httppost** httpPost,
const std::string& fieldName,
const WebPostData& fieldData);
81 void WriteMultipartFormBinary(curl_httppost** httpPost,
const std::string& fieldName,
const WebPostData& fieldData);
84 static size_t ReadCallback(
void *ptr,
size_t size,
size_t nmemb,
void *stream);
86 bool ValidateHeaders();
88 const TWebRequestHandleId m_handleId;
90 curl_slist* m_pCurlHeaderChunk;
91 curl_httppost* m_pCurlFormPost;
95 std::string m_caCertFilePath;
96 bool m_caCertRequired;