Kea
1.9.9-git
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
isc::http::HttpRequest::requireHttpMethod
void requireHttpMethod(const HttpRequest::Method &method)
Specifies an HTTP method allowed for the request.
Definition:
request.cc:53
isc::http::HostHttpHeader
Represents HTTP Host header.
Definition:
http_header.h:68
isc::http::HttpVersion
HTTP protocol version.
Definition:
http_types.h:14
post_request.h
isc::http::PostHttpRequest::PostHttpRequest
PostHttpRequest()
Constructor for inbound HTTP request.
Definition:
post_request.cc:14
version
int version()
returns Kea hooks version.
Definition:
bootp/version.cc:13
isc::http::HttpRequest::Method
Method
HTTP methods.
Definition:
request.h:53
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:143
isc::http::BasicHttpAuthPtr
boost::shared_ptr< BasicHttpAuth > BasicHttpAuthPtr
Type of pointers to basic HTTP authentication objects.
Definition:
basic_auth.h:70
isc::http::HttpRequest
Represents HTTP request message.
Definition:
request.h:49
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::Method::HTTP_POST
src
lib
http
post_request.cc
Generated on Wed Sep 15 2021 10:48:33 for Kea by
1.8.9.1