Рейтинг@Mail.ru

Class luatest.http_response

Замечание

Документация находится в процессе перевода и может отставать от английской версии.

Class luatest.http_response

Class to provide helper methods for HTTP responses

For backward compatibility this methods should be accessed as object’s fields (eg., response.json.id ).

They are not assigned to object’s fields on initialization to be evaluated lazily and to be able to throw errors.

Parse json from body.

response.json.id

Check that status code is 2xx.