Kea
2.7.4
post_request.cc
Go to the documentation of this file.
1
// Copyright (C) 2016-2020 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#include <config.h>
8
9
#include <
http/post_request.h
>
10
11
namespace
isc
{
12
namespace
http {
13
14
PostHttpRequest::PostHttpRequest
()
15
:
HttpRequest
() {
16
requireHttpMethod
(
Method::HTTP_POST
);
17
requireHeader
(
"Content-Length"
);
18
requireHeader
(
"Content-Type"
);
19
}
20
21
PostHttpRequest::PostHttpRequest
(
const
Method
& method,
const
std::string& uri,
22
const
HttpVersion
&
version
,
23
const
HostHttpHeader
& host_header,
24
const
BasicHttpAuthPtr
& basic_auth)
25
:
HttpRequest
(method, uri,
version
, host_header, basic_auth) {
26
requireHttpMethod
(
Method::HTTP_POST
);
27
requireHeader
(
"Content-Length"
);
28
requireHeader
(
"Content-Type"
);
29
}
30
31
32
}
// namespace http
33
}
// namespace isc
version
int version()
returns Kea hooks version.
Definition
bootp/version.cc:13
isc::http::HostHttpHeader
Represents HTTP Host header.
Definition
http_header.h:68
isc::http::HttpMessage::requireHeader
void requireHeader(const std::string &header_name)
Specifies a required HTTP header for the HTTP message.
Definition
http_message.cc:29
isc::http::HttpRequest
Represents HTTP request message.
Definition
request.h:57
isc::http::HttpRequest::Method
Method
HTTP methods.
Definition
request.h:61
isc::http::HttpRequest::Method::HTTP_POST
@ HTTP_POST
isc::http::HttpRequest::requireHttpMethod
void requireHttpMethod(const HttpRequest::Method &method)
Specifies an HTTP method allowed for the request.
Definition
request.cc:63
isc::http::PostHttpRequest::PostHttpRequest
PostHttpRequest()
Constructor for inbound HTTP request.
Definition
post_request.cc:14
isc::http::BasicHttpAuthPtr
boost::shared_ptr< BasicHttpAuth > BasicHttpAuthPtr
Type of pointers to basic HTTP authentication objects.
Definition
basic_auth.h:70
isc
Defines the logger used by the top-level component of kea-lfc.
Definition
agent_parser.cc:148
post_request.h
isc::http::HttpVersion
HTTP protocol version.
Definition
http_types.h:14
src
lib
http
post_request.cc
Generated on Thu Oct 3 2024 18:33:08 for Kea by
1.10.0