neume-network / extraction-worker

Async worker_thread component for maximalizing concurrent data retrieval and processing.
GNU General Public License v3.0
3 stars 5 forks source link

try to parse all requests as json #54

Closed il3ven closed 2 years ago

il3ven commented 2 years ago

Fixes #53

Try to parse all requests as json and fallback to returning text if unparsable. In case the body is unparsable but content-type is json we throw an error. Also add tests for various cases.

Created a new file for request because I didn't want to add all the new test cases in api_test.mjs file. That file is already quite large.

TimDaub commented 2 years ago

nice thanks