httpyac icon indicating copy to clipboard operation
httpyac copied to clipboard

Unsupported JS import statements & other JS syntax

Open sedubois opened this issue 1 year ago • 2 comments

We have been making use of IntelliJ IDEA's Javascript import syntax, however this prevents us from using the HTTP request files with httpYac because httpYac does not support import statements (it expects require). And unfortunately, httpYac's require syntax is not supported in IntelliJ, so there appears to be currently no cross-IDE solution. Is there any chance for httpYac for VSCode to add support for JS import statements?

Also:

  • This JS syntax works in IntelliJ but doesn't work in httpYac:
    • const match = response.body.match(/foo/i) (need to change it to const match = String(response.body).match(/foo/i))
    • client.log("match", match) (need to change it to client.log("match: " + match))
  • The feature comparison says that IntelliJ doesn't have some features although these features actually exist:
    • CLI: see documentation
    • "Built-in Preview Support": see the small preview button beside the raw response, it allows to see the rendered HTML response. The documentation shows that it's also possible to preview PDF and image responses.

Thanks for building this great tool!

Tested with httpYac 6.16.14

sedubois avatar Nov 08 '24 10:11 sedubois

I have also ran into this problem and would like to see IntelliJ-compatible import statements supported.

I can't agree more -- this is a fantastic tool!

wss-asteinacher avatar Mar 27 '25 17:03 wss-asteinacher

+1 here. This would be great to have the compatibility across plugins!

estacioneto avatar Jun 06 '25 08:06 estacioneto