Package com.jsunsoft.http
Interface HttpRequest
-
public interface HttpRequestHttpRequest is the main entry point to the API used to build and execute client requests.HttpRequest objects are immutable they can be shared.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebTargetimmutableTarget(String uri)WebTargetimmutableTarget(URI uri)WebTargetretryableTarget(String uri, RetryContext retryContext)WebTargetretryableTarget(URI uri, RetryContext retryContext)WebTargettarget(String uri)Build a new web resource target.WebTargettarget(URI uri)Build a new web resource target.
-
-
-
Method Detail
-
target
WebTarget target(URI uri)
Build a new web resource target.- Parameters:
uri- web resource URI. Must not benull.- Returns:
- web resource target bound to the provided URI.
- Throws:
NullPointerException- in case the supplied argument isnull.
-
target
WebTarget target(String uri)
Build a new web resource target.- Parameters:
uri- The string to be parsed into a URI- Returns:
- Target instance
- Throws:
NullPointerException- IfstrisnullIllegalArgumentException- If the given string violates RFC 2396
-
retryableTarget
@Beta WebTarget retryableTarget(URI uri, RetryContext retryContext)
- Parameters:
uri- web resource URI. Must not benull.retryContext- retryContext. Must not benull.- Returns:
- Retryable WebTarget instance
- Throws:
NullPointerException- in case the supplied argument isnull.
-
retryableTarget
@Beta WebTarget retryableTarget(String uri, RetryContext retryContext)
- Parameters:
uri- The string to be parsed into a URIretryContext- retryContext. Must not benull.- Returns:
- Retryable WebTarget instance
- Throws:
NullPointerException- IfstrisnullIllegalArgumentException- If the given string violates RFC 2396
-
immutableTarget
WebTarget immutableTarget(URI uri)
- Parameters:
uri- web resource URI. Must not benull.- Returns:
- Immutable WebTarget instance. Can be shared between threads.
- Throws:
NullPointerException- in case the supplied argument isnull.
-
immutableTarget
WebTarget immutableTarget(String uri)
- Parameters:
uri- The string to be parsed into a URI- Returns:
- Immutable WebTarget instance. Can be shared between threads.
- Throws:
NullPointerException- IfstrisnullIllegalArgumentException- If the given string violates RFC 2396
-
-