File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
com.dbeaver.jdbc.driver.libsql/src/main/java/com/dbeaver/jdbc/driver/libsql/client Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2222import org .jkiss .code .NotNull ;
2323import org .jkiss .code .Nullable ;
2424import org .jkiss .utils .CommonUtils ;
25+ import org .jkiss .utils .HttpConstants ;
2526
2627import java .io .IOException ;
2728import java .io .StringReader ;
@@ -97,8 +98,8 @@ public LibSqlExecutionResult[] executeBatch(
9798 final HttpRequest .Builder builder = HttpRequest .newBuilder ()
9899 .uri (url .toURI ())
99100 .version (HttpClient .Version .HTTP_1_1 )
100- .header ("Content-Type" , "application/json" )
101- .header ("User-Agent" , userAgent )
101+ .header (HttpConstants . HEADER_CONTENT_TYPE , "application/json" )
102+ .header (HttpConstants . HEADER_USER_AGENT , userAgent )
102103 .POST (HttpRequest .BodyPublishers .ofString (requestBuffer .toString ()));
103104 if (!CommonUtils .isEmpty (authToken )) {
104105 builder .header ("Authorization" , "Bearer " + authToken );
@@ -162,7 +163,7 @@ public HttpURLConnection openSimpleConnection(String endpoint) throws IOExceptio
162163 }
163164 baseURL += endpoint ;
164165 HttpURLConnection connection = (HttpURLConnection ) new URL (baseURL ).openConnection ();
165- connection .setRequestProperty ("User-Agent" , userAgent );
166+ connection .setRequestProperty (HttpConstants . HEADER_USER_AGENT , userAgent );
166167 return connection ;
167168 }
168169
You can’t perform that action at this time.
0 commit comments