You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
329 B
C++
17 lines
329 B
C++
![]()
8 years ago
|
#include "csoap/http_message.h"
|
||
|
|
||
|
namespace csoap {
|
||
|
|
||
|
void HttpMessage::SetHeader(const std::string& name, const std::string& value) {
|
||
|
for (HttpHeader& h : headers_) {
|
||
|
if (h.name == name) { // TODO: Ignore case?
|
||
|
h.value = value;
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
headers_.push_back({ name, value });
|
||
|
}
|
||
|
|
||
|
} // namespace csoap
|