-
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.
Improve URL manipulation support with UriTemplate (and Encoders) This is primarily a change to the Encoders to support form-style string expansion and continuation as separate encoding strategies, which aligns better with RFC6570. This makes query parameter support in UriTemplate possible without major modifications to UriTemplate.
- Loading branch information
Showing
12 changed files
with
722 additions
and
358 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 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 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 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
14 changes: 14 additions & 0 deletions
14
modules/lily-http/src/main/java/io/github/tomboyo/lily/http/encoding/Encoder.java
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,14 @@ | ||
package io.github.tomboyo.lily.http.encoding; | ||
|
||
/** | ||
* A function with formats and URL-encodes given objects, returning a string suitable for | ||
* constructing URLs. | ||
* | ||
* @see Encoders | ||
* @see io.github.tomboyo.lily.http.UriTemplate | ||
*/ | ||
@FunctionalInterface | ||
public interface Encoder { | ||
/** Produce an appropriate URL-encoded string for the given parameter name and value. */ | ||
String encode(String parameterName, Object value); | ||
} |
Oops, something went wrong.