Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json post bug #59

Open
ce2020-ai opened this issue May 25, 2022 · 0 comments
Open

Json post bug #59

ce2020-ai opened this issue May 25, 2022 · 0 comments

Comments

@ce2020-ai
Copy link

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 b6b8795.

Originally posted by @elnormous in #38 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant