/*
 * request.cpp
 *
 *  Created on: 2021年8月16日
 *      Author: pengzc
 */

#include "http_request.h"

namespace base {

HttpRequest::HttpRequest(const std::string& method, const std::string& url,
    const std::string& body) {
  method_ = method;
  url_ = url;
  body_ = body;
}

HttpRequest::~HttpRequest() {
}

HttpRequest& HttpRequest::AppendHeader(const std::string& key,
    const std::string& value) {
  header[key] = value;
  return *this;
}

HttpRequest& HttpRequest::ContentType(const std::string& content_type) {
  header["Content-Type"] = content_type;
  return *this;
}

HttpRequest& HttpRequest::AppendPart(const std::string& name,
    const std::string& value) {
  multiparts_[name] = value;
  return *this;
}

} /* namespace base */


