-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create RequestOptions * Update base client to add methods with support for RequestOptions * Update client to add methods with support for RequestOptions * Update live test to include request options usage * Update request helper methods to use overloaded methods * Update Collections.EMPTY_MAP to Collections.emptyMap() * Update overloaded methods to call one method with most params * Add support for listing warrants * Call correct overloaded method --------- Co-authored-by: Karan Kajla <[email protected]>
- Loading branch information
1 parent
2e24b39
commit 6aecb73
Showing
8 changed files
with
1,098 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package dev.warrant; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class RequestOptions { | ||
private String warrantToken; | ||
|
||
public RequestOptions() {} | ||
|
||
public RequestOptions withWarrantToken(String warrantToken) { | ||
this.warrantToken = warrantToken; | ||
return this; | ||
} | ||
|
||
public Map<String, Object> asMap() { | ||
Map<String, Object> options = new HashMap<>(); | ||
|
||
if (this.warrantToken != null) { | ||
options.put("Warrant-Token", warrantToken); | ||
} | ||
|
||
return options; | ||
} | ||
} |
Oops, something went wrong.