neuray Services API Programmer's Manual

mi::nservices::IHttp_response Class Reference

[Http Client]

Description

Represent an individual HTTP response as used in IHttp_response_handler.

Public Member Functions

virtual const neuraylib::IBufferget_body() const =0
Returns the response body, if any.
virtual mi::Uint32 get_code() const =0
The code returned by the request.
virtual mi::Size get_content_length() const =0
Returns the content length header value or 0 if no content length header exists.
virtual const char* get_content_type() const =0
Returns the content type header value or NULL if no content type exists.
virtual const char* get_header( const char* name) const =0
Returns the first header with given name or NULL if the header doesn't exist. More...
virtual const IArrayget_headers() const =0
The headers returned by the request. More...
virtual const char* get_message() const =0
The message returned by the request.

Member Functions

virtual const neuraylib::IBuffer* mi::​nservices::​IHttp_response::get_body() const [pure virtual]

Returns the response body, if any.

virtual mi::Uint32 mi::​nservices::​IHttp_response::get_code() const [pure virtual]

The code returned by the request.

virtual mi::Size mi::​nservices::​IHttp_response::get_content_length() const [pure virtual]

Returns the content length header value or 0 if no content length header exists.

virtual const char* mi::​nservices::​IHttp_response::get_content_type() const [pure virtual]

Returns the content type header value or NULL if no content type exists.

virtual const char* mi::​nservices::​IHttp_response::get_header( const char* name) const [pure virtual]

Returns the first header with given name or NULL if the header doesn't exist.

Parameters

name
the name of the header to retrieve.
virtual const IArray* mi::​nservices::​IHttp_response::get_headers() const [pure virtual]

The headers returned by the request. The returned array consists of mi::IString elements each of which is the colon separated header name and value.

virtual const char* mi::​nservices::​IHttp_response::get_message() const [pure virtual]

The message returned by the request.