@Immutable
public interface RequestURI
Instance of this interface is returned by Request.uri()
,
and can be modified using one of the methods below. When modification
is done, method back()
returns a modified instance of
Request
, for example:
new JdkRequest("http://my.example.com") .header("Accept", "application/json") .uri() .path("/users") .queryParam("name", "Jeff Lebowski") .back() // returns a modified instance of Request .fetch()
Instances of this interface are immutable and thread-safe.
Modifier and Type | Method and Description |
---|---|
Request |
back()
Get back to the request it's related to.
|
URI |
get()
Get URI.
|
RequestURI |
path(String segment)
Add URI path.
|
RequestURI |
port(int num)
Set port number.
|
RequestURI |
queryParam(String name,
Object value)
Add query param.
|
RequestURI |
queryParams(Map<String,String> map)
Add query params.
|
RequestURI |
set(URI uri)
Set URI.
|
RequestURI |
userInfo(String info)
Set user info.
|
Request back()
URI get()
RequestURI set(URI uri)
uri
- URI to setRequestURI queryParam(String name, Object value)
name
- Query param namevalue
- Value of the query param to setRequestURI queryParams(Map<String,String> map)
map
- Map of params to addRequestURI path(String segment)
segment
- Path segment to addRequestURI userInfo(String info)
info
- User info part to setRequestURI port(int num)
num
- The port number to setCopyright © 2012–2016 jcabi.com. All rights reserved.