Java 17 Text Blocks - CONSTRUCT query - Invalid characters (CR/LF) in header query #3653
-
Hi there, currently playing with "Java Text Blocks" for CONSTRUCT Query.
so the query is long, but not long enough to be sent via post. Is there a way to force http post ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The query itself is never sent via a header attribute. It's either sent as a url parameter (when using a GET request), or as part of the payload body (when using POST). And as you correctly remark, the choice depends on the total length of the URL (including the parameters): if the client detects that that goes over a limit, it switches to POST. By default, that value is set to 4083 characters. If your HTTP server is not accepthing URLs of that length though, you can reconfigure the max length default by setting the |
Beta Was this translation helpful? Give feedback.
The query itself is never sent via a header attribute. It's either sent as a url parameter (when using a GET request), or as part of the payload body (when using POST). And as you correctly remark, the choice depends on the total length of the URL (including the parameters): if the client detects that that goes over a limit, it switches to POST. By default, that value is set to 4083 characters.
If your HTTP server is not accepthing URLs of that length though, you can reconfigure the max length default by setting the
rdf4j.sparql.url.maxlength
environment variable to some lower value. You can even set it to 0, in which case it will use POST for every query. See also https://rdf4j.org/javad…