Interface RestTarget.Invocation
- Enclosing interface:
RestTarget
public static interface RestTarget.Invocation
Represents a request invocation.
- Author:
- Holger Eichelberger, SSE
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Invoke HTTP DELETE method for the current request synchronously.<T> TInvoke HTTP GET method for the current request synchronously, read the message entity input stream as an instance of specified Java type.default StringInvoke HTTP GET method for the current request synchronously, read the message entity input stream as an instance of String.voidInvoke HTTP PUT method for the current request synchronously, taking the creation of the invocation (e.g.
-
Method Details
-
get
Invoke HTTP GET method for the current request synchronously, read the message entity input stream as an instance of specified Java type.- Type Parameters:
T- entity instance Java type- Parameters:
cls- the type of entity- Returns:
- the invocation request in the specified type
- Throws:
IOException- if invoking/turning the result into the specified type fails
-
getAsString
Invoke HTTP GET method for the current request synchronously, read the message entity input stream as an instance of String.- Returns:
- the invocation request in the specified type
- Throws:
IOException- if invoking/turning the result into a String fails- See Also:
-
put
Invoke HTTP PUT method for the current request synchronously, taking the creation of the invocation (e.g. JSON) into account for encoding/creating the body entity.- Parameters:
body- the body- Throws:
IOException- if invoking/turning the result into a String fails
-
delete
Invoke HTTP DELETE method for the current request synchronously.- Throws:
IOException- if invoking delete fails
-