Skip to content

Commit

Permalink
Add HttpRequestFormatter.Builder.bodyParams(List<Param>) method
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Aug 30, 2022
1 parent 4f1a60d commit 3d28e96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Changelog

## [Unreleased]
### Added
- `HttpRequestFormatter.Builder.bodyParams(List<Param>)` method, by @HardNorth

## [5.0.2]
### Added
- Add `HttpFormatUtils.getBodyType` method, by @HardNorth
- `HttpFormatUtils.getBodyType` method, by @HardNorth

## [5.0.1]
### Added
- Add `application/x-www-form-urlencoded` body type handling, by @HardNorth
- `application/x-www-form-urlencoded` body type handling, by @HardNorth

## [5.0.0]
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ public Builder bodyBytes(String mimeType, byte[] payload) {
return this;
}

public Builder bodyParams(List<Param> formParameters) {
type = BodyType.FORM;
this.mimeType = ContentType.APPLICATION_FORM_URLENCODED.getMimeType();
body = formParameters;
return this;
}

public Builder bodyParams(Map<String, String> formParameters) {
type = BodyType.FORM;
this.mimeType = ContentType.APPLICATION_FORM_URLENCODED.getMimeType();
Expand Down

0 comments on commit 3d28e96

Please sign in to comment.