extism / js-pdk

Write Extism plugins in JavaScript & TypeScript
42 stars 16 forks source link

fix: Fixes HTTP Call code #37

Closed bhelx closed 6 months ago

bhelx commented 6 months ago

Fixes #36

Had some misunderstandings of the quickjs interface in rust in this code. This fixes the problem. However I think a longer term fix would be to move more of this code up into the polyfill / prelude area: https://github.com/extism/js-pdk/tree/main/crates/core/src/prelude

The reason being that more of our validation and preparation logic should be written in JS rather than rust because it's more ergonomic and the error messages are better.