Kea  1.9.9-git
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 
15  : HttpRequest() {
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) {
27  requireHeader("Content-Length");
28  requireHeader("Content-Type");
29 }
30 
31 
32 } // namespace http
33 } // namespace isc
void requireHttpMethod(const HttpRequest::Method &method)
Specifies an HTTP method allowed for the request.
Definition: request.cc:53
Represents HTTP Host header.
Definition: http_header.h:68
HTTP protocol version.
Definition: http_types.h:14
PostHttpRequest()
Constructor for inbound HTTP request.
Definition: post_request.cc:14
int version()
returns Kea hooks version.
Method
HTTP methods.
Definition: request.h:53
Defines the logger used by the top-level component of kea-dhcp-ddns.
boost::shared_ptr< BasicHttpAuth > BasicHttpAuthPtr
Type of pointers to basic HTTP authentication objects.
Definition: basic_auth.h:70
Represents HTTP request message.
Definition: request.h:49
void requireHeader(const std::string &header_name)
Specifies a required HTTP header for the HTTP message.
Definition: http_message.cc:29