neuray Services API Programmer's Manual

mi::nservices::IHttp_response_handler Class Reference

[Http Client]

Description

User implemented response handler called with the response of the HTTP request. When an instance of this interface is passed to IHttp_request::send either handle will be called with the HTTP response or error will be called.

Public Member Functions

virtual void error( mi::Sint32 code, const char* message) =0
Called when an error occurs that prevents the HTTP request from getting made. More...
virtual void handle( mi::Uint32 code, const char* message, const IHttp_response* response) =0
Called when the HTTP request is complete, or incrementally with new data if streaming was enabled when the request was made. More...

Member Functions

virtual void mi::​nservices::​IHttp_response_handler::error( mi::Sint32 code, const char* message) [pure virtual]

Called when an error occurs that prevents the HTTP request from getting made. This will not be called if an HTTP response contains an error code. A request that generates a valid HTTP response will always call handle.

Parameters

code
the error code. Possible values are:
  • -1 unknown error
  • -2 unsupported protocol
  • -3 failed to initialise
  • -4 malformed URL
  • -5 feature or protocol not supported
  • -6 could not resolve host
  • -7 could not connect to host
  • -8 remote access denied
  • -9 request timed out
  • -10 ssl connect error
  • -11 redirect limit reached
  • -12 failed to send network data
  • -13 failed to receive network data
  • -14 error with the local client certificate
  • -15 couldn't use specified ssl cipher
  • -16 remote ssl certificate or fingerprint is not valid
  • -17 transfer encoding not recognised
  • -18 failed to initialise ssl
  • -19 login attempt denied
  • -20 error reading ssl ca cert
  • -21 ssl failed to shutdown
  • -22 ssl issuer check failed
message
an assocated error message.
virtual void mi::​nservices::​IHttp_response_handler::handle( mi::Uint32 code, const char* message, const IHttp_response* response) [pure virtual]

Called when the HTTP request is complete, or incrementally with new data if streaming was enabled when the request was made.

Parameters

code
the code returned by the HTTP request.
message
the message return by the HTTP request.
response
the response returned by the HTTP request.