7 #ifndef HTTP_RESPONSE_JSON_H 8 #define HTTP_RESPONSE_JSON_H boost::shared_ptr< HttpResponseJson > HttpResponseJsonPtr
Pointer to the HttpResponseJson object.
data::ConstElementPtr getJsonElement(const std::string &element_name) const
Retrieves a single JSON element.
data::ConstElementPtr getBodyAsJson() const
Retrieves JSON body.
data::ConstElementPtr json_
Pointer to the parsed JSON body.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
HttpResponseJsonError(const char *file, size_t line, const char *what)
Represents HTTP response message.
boost::shared_ptr< const Element > ConstElementPtr
static const CallSetGenericBody & yes()
Returns encapsulated true.
Generic exception thrown by HttpResponse class.
Represents HTTP response with JSON content.
Defines the logger used by the top-level component of kea-dhcp-ddns.
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.
int version()
returns Kea hooks version.
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.