7 #ifndef HTTP_RESPONSE_JSON_H
8 #define HTTP_RESPONSE_JSON_H
boost::shared_ptr< HttpResponseJson > HttpResponseJsonPtr
Pointer to the HttpResponseJson object.
data::ConstElementPtr json_
Pointer to the parsed JSON body.
HttpResponseJsonError(const char *file, size_t line, const char *what)
Represents HTTP response message.
boost::shared_ptr< const Element > ConstElementPtr
int version()
returns Kea hooks version.
static const CallSetGenericBody & yes()
Returns encapsulated true.
data::ConstElementPtr getJsonElement(const std::string &element_name) const
Retrieves a single JSON element.
Generic exception thrown by HttpResponse class.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Represents HTTP response with JSON content.
Defines the logger used by the top-level component of kea-dhcp-ddns.
data::ConstElementPtr getBodyAsJson() const
Retrieves JSON body.
void parseBodyAsJson()
Interprets body as JSON, which can be later retrieved using data element objects. ...
Exception thrown when body of the HTTP message is not JSON.
virtual void finalize()
Completes creation of the HTTP response.
void setBodyAsJson(const data::ConstElementPtr &json_body)
Generates JSON content from the data structures represented as data::ConstElementPtr.
Encapsulates the boolean value indicating if the HttpResponse constructor should call its setGenericB...
HttpStatusCode
HTTP status codes (cf RFC 2068)
HttpResponseJson()
Constructor for the inbound HTTP response.
virtual void reset()
Reset the state of the object.