Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add ability to pass in query params as Map
  • Loading branch information
x7airworker committed Apr 29, 2022
commit ba2764f816af415e34b8061270c5175c8def0b19
5 changes: 5 additions & 0 deletions src/main/java/org/javawebstack/httpclient/HTTPRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public HTTPRequest header(String key, String... values) {
return this;
}

public HTTPRequest query (Map<String, String> values) {
values.forEach(this::query);
return this;
}

public HTTPRequest query(String key, String value){
query.set(key, value);
return this;
Expand Down