elnormous / elnormous/HTTPRequest
Json post bug
- Dominant language
- C++
- Stars
- 970
- Forks
- 200
- PR merge metrics
- No merged PRs in 30d
Description
I built a request using nlohmann:: JSON and wrote the code according to the example, but I encountered the following bug:
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
Aborted
You should use a JSON library like https://github.com/nlohmann/json for JSON encoding. JSON is not a part of the HTTP standard (RFC 7231) so it is out of the scope of this library. I added an example on hot wo send a JSON POST in https://github.com/elnormous/HTTPRequest/commit/b6b87953e5a639ba6c88e574c6d972a728463da8.
_Originally posted by @elnormous in https://github.com/elnormous/HTTPRequest/issues/38#issuecomment-882886699_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.