ltex-ls icon indicating copy to clipboard operation
ltex-ls copied to clipboard

Fix LT HTTP request Content-Type

Open Javier-varez opened this issue 9 months ago • 0 comments

The LanguageTool check endpoint actually expects an HTTP request with an "application/x-www-form-urlencoded" Content-Type. Currently ltex-ls uses the "application/json" Content-Type for the HTTP request, but this does not play well with some third-party tools that follow the same LanguageTool API like https://github.com/cpg314/ltapiserv-rs.

The official LanguageTool HTTP server does not seem to be affected by this bug.

See the API documentation: https://languagetool.org/http-api/swagger-ui/#!/default/post_check

Javier-varez avatar Oct 06 '23 19:10 Javier-varez