Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
JSONDecodeError when using default locations and required=True argument #80
When using default setup with aiohttp and default locations, the server will throw exception "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)" if the client doesn't send the required parameter and there is no json data in the http request.
I am not sure if that's a bug or expected behavior, but that's absolutely counter-intuitive, especially if you just started to use the library.
See how I put absolutely random stuff to the post data. However, if you don't post any data in the query at all, the bug doesn't seem to work. Sorry I forgot to mention this detail in the initial post.