HTTP wrappers

On this documentation page you will find definition of classes, which used for wrapping inner data of aiorest-ws into HTTP-like request or response objects.



  • method

    Returns a method name as string, which specified by client at the request.

  • url

    Returns a request URL as string of described resource which necessary to take.

  • args

    Returns dictionary of arguments for request.

    For example in the “classical REST” you can send the HTTP request by the URL something like and a part of him, parameters, converted later to the dictionary {'name': admin, 'password': admin}.

Available methods:

  • to_representation

    Returns part of request as a dictionary object. It used for serializing and appending method, url part to the response object.

  • get_argument

    As an function argument take name, which necessary to extract from request. If this parameter not found, returns None.



  • content

    This property return content (or result some view), which will be serialized later as response for client.

Available methods:

  • wrap_exception

    As an argument take exception object (which inherited from BaseAPIException) and set his message for content property.

  • append_request

    As an argument take request, which used for appending part of Request object to the Response object.