7 #ifndef HTTP_POST_REQUEST_JSON_H
8 #define HTTP_POST_REQUEST_JSON_H
13 #include <boost/shared_ptr.hpp>
Represents HTTP POST request with JSON body.
Generic exception thrown by HttpRequest class.
data::ConstElementPtr getBodyAsJson() const
Retrieves JSON body.
virtual void finalize()
Complete parsing of the HTTP request.
Represents HTTP POST request.
data::ConstElementPtr getJsonElement(const std::string &element_name) const
Retrieves a single JSON element.
Exception thrown when body of the HTTP message is not JSON.
boost::shared_ptr< PostHttpRequestJson > PostHttpRequestJsonPtr
Pointer to PostHttpRequestJson.
virtual void reset()
Reset the state of the object.
PostHttpRequestJson()
Constructor for inbound HTTP request.
HttpRequestJsonError(const char *file, size_t line, const char *what)
boost::shared_ptr< const Element > ConstElementPtr
int version()
returns Kea hooks version.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void setBodyAsJson(const data::ConstElementPtr &body)
Sets JSON body for an outbound message.
data::ConstElementPtr json_
Pointer to the parsed JSON body.
boost::shared_ptr< BasicHttpAuth > BasicHttpAuthPtr
Type of pointers to basic HTTP authentication objects.
void parseBodyAsJson()
Interprets body as JSON, which can be later retrieved using data element objects. ...