Skip to content

Commit

Permalink
Specify HTTP 1.1 version (#46)
Browse files Browse the repository at this point in the history
Git Ignore VSCode related

Signed-off-by: Paolo Patierno <[email protected]>

Signed-off-by: Paolo Patierno <[email protected]>
  • Loading branch information
ppatierno authored and im-konge committed Nov 28, 2022
1 parent 489dafd commit e390a31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
.idea/
*.iml

# VS Code
.factorypath
.vscode

**/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

Expand All @@ -18,7 +19,8 @@ protected HttpRequest.Builder builder(HttpContext context) {
try {
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(new URI(context.getUri()))
.setHeader(context.getHeaderKey(), context.getHeaderValue());
.setHeader(context.getHeaderKey(), context.getHeaderValue())
.version(HttpClient.Version.HTTP_1_1);

if (context.getRecord() == null) {
builder.GET();
Expand Down

0 comments on commit e390a31

Please sign in to comment.