I added the previously created in #105 parsingUtil usage to ws, and reshuffled some code in fetch to make it easier to understand and maintain.
P.S. while working on fetch I found some slightly weird things, for example, we always send the content header as application/json in case there is a body provided, even though other headers are seemingly supported (for example the body isn't JSON.stringifyd in case the provided header isn't application/json)
@SaltyAom Can you provide some insight into why it's done like this?
I added the previously created in #105 parsingUtil usage to ws, and reshuffled some code in fetch to make it easier to understand and maintain.
P.S. while working on fetch I found some slightly weird things, for example, we always send the content header as
application/json
in case there is a body provided, even though other headers are seemingly supported (for example the body isn'tJSON.stringify
d in case the provided header isn'tapplication/json
) @SaltyAom Can you provide some insight into why it's done like this?