elysiajs / eden

Fully type-safe Elysia client
MIT License
147 stars 37 forks source link

Add parsing util to ws and treaty 1, also temporarily fix pipeline #106

Closed dandeduck closed 1 month ago

dandeduck commented 2 months ago

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?

dandeduck commented 2 months ago

I noticed that newest bun version 1.1.16 fails to install elysia in this project, temporarily setting the version to 1.1.12 seems to fix it.