简体   繁体   中英

JetBrains IDEs internal web server API stopped working as expected (on latest 2022.3.1 WebStorm)

IntelliJ based IDEs running built-in web server , usually running on port 63342.

The supposedly supported API can be found here :

 * @apiExample {curl} Absolute path
 * curl http://localhost:63342/api/file//absolute/path/to/file.kt
 *
 * @apiExample {curl} Relative path
 * curl http://localhost:63342/api/file/relative/to/module/root/path/to/file.kt
 *
 * @apiExample {curl} With line and column
 * curl http://localhost:63342/api/file/relative/to/module/root/path/to/file.kt:100:34
 *
 * @apiExample {curl} Query parameters
 * curl http://localhost:63342/api/file?file=path/to/file.kt&line=100&column=34

or pretty printed here .

This API worked perfectly fine on WebStorm 2020.3 (I installed it just to check):

在此处输入图像描述

However it stopped working as expected on 2022.1 (or maybe before):

在此处输入图像描述

As a result, any extension based on this API (such this one I'm using) stopped working.

If the API of the built-in web server has changed, I can't find where it is documented (and chatGPT doesn't know it because it's too new ).

The latest indication I could find that the API was working as expected as described above, is here from 2020/3/16.

Note, this is not a duplicate: this thread is old and not relevant, this issue is not related to the security update that required checking 'Allow unsigned requests' in the settings.

In 2022.3 /api/file/ was moved to IDE Remote Control plugin, it's now required for the API to work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM