Did you know ... | Search Documentation: |
![]() | Pack lsp_server -- prolog/lsp_parser.pl |
Module for parsing the body & headers from an LSP client.
The HTTP headers are parsed into an assoc
tree which maps
strings to strings. The body of the request is parsed into a dict according
to json_read_dict/3. The headers list must include a Content-Length
header.
?- phrase(lsp_request(Req), `Content-Length: 7\r\n\r\n{"x":1}`). Req = _{body:_{x:1}, headers:t("Content-Length", "7", -, t, t)}.