Skip to content
Snippets Groups Projects
Commit 83168b25 authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Igor Munkin
Browse files

httpc: add a decoders to a http response

Patch fixes a bug when body in response couldn't be decoded:

NO_WRAP
```
tarantool> httpc = require('http.client').new()
tarantool> response = httpc:get('https://jsonplaceholder.typicode.com/todos/1'

)
tarantool> response:decode()

---
- error: 'builtin/http.client.lua:301: attempt to index field ''decoders'' (a nil
    value)'
...
```
NO_WRAP

Now response object contains table with decoders defined by user in his
http client instance. We hide this table on response serialization by
adding underscore because decoders there is not a part of API.

Reported-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>

Fixes #8363

NO_DOC=bugfix
parent 48f73867
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment