Package shttp :: Module http :: Class CustomResponse
[hide private]
[frames] | no frames]

Class CustomResponse

source code

Instance Methods [hide private]
 
__init__(self, data, headers={}, content_type='text/plain', status=200, reason='Response Follows', options={}, content_type_from_path=None)
This class is used as an exception to send Custom Responses from a SPyRO method to the HTTP web server.
source code
Method Details [hide private]

__init__(self, data, headers={}, content_type='text/plain', status=200, reason='Response Follows', options={}, content_type_from_path=None)
(Constructor)

source code 
This class is used as an exception to send Custom Responses from a
SPyRO method to the HTTP web server. The web server must known how this
must be handled.
|data| The data to be send in the response (an str object)
|headers| A dictionary with pair valued headers
|content_type| The content type of the data
|status| The number of status to present in the response (if it's posible).
         The default value is 200 (OK).