|
|
@@ -81,20 +81,27 @@ enum HttpStatusCode : int
|
|
|
|
|
|
struct HttpClientRequestConfig
|
|
|
{
|
|
|
- /*
|
|
|
- * Start with "http://" or "https://"
|
|
|
- */
|
|
|
- HttpClientRequestConfig(const std::string& uri) :mMethod(HttpRequestMethod::GET), mUri(uri), mToValidCert(false)
|
|
|
+ /*!
|
|
|
+ * @brief
|
|
|
+ * @param[in] uri: 必须以 "http://" 或 "https://" 开头
|
|
|
+ * @param[out]
|
|
|
+ * @return :
|
|
|
+ */
|
|
|
+ HttpClientRequestConfig(const std::string& uri)
|
|
|
+ :mMethod(HttpRequestMethod::GET), mUri(uri), mToValidCert(false)
|
|
|
{
|
|
|
}
|
|
|
- HttpClientRequestConfig(HttpRequestMethod method) : mMethod(method), mToValidCert(false)
|
|
|
+ HttpClientRequestConfig(HttpRequestMethod method)
|
|
|
+ : mMethod(method), mToValidCert(false)
|
|
|
{
|
|
|
}
|
|
|
- HttpClientRequestConfig(HttpRequestMethod method, const std::string& uri) :mMethod(method), mUri(uri), mToValidCert(false)
|
|
|
+ HttpClientRequestConfig(HttpRequestMethod method, const std::string& uri)
|
|
|
+ :mMethod(method), mUri(uri), mToValidCert(false)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
void SetRequestType(HttpRequestMethod method) { mMethod = method; }
|
|
|
+ // uri: 必须以 "http://" 或 "https://" 开头
|
|
|
void SetUri(const std::string& uri) { mUri = uri; }
|
|
|
void SetChildUri(const std::string& subUri) { mSubUri = subUri; }
|
|
|
void AppendQuery(const std::string& name, const std::string& value) {
|