public interface RestRequest extends WscMessage
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String name,
String value)
Add an arbitrary header.
|
RestFuture |
send()
Marks the message as ready to send.
|
RestFuture |
send(Object entity,
RestMediaType mediaType)
Trigger the REST request invocation.
|
void |
setAccept(RestMediaType... mediaTypes)
Set the media types used in the invocation.
|
void |
setAcceptLanguage(String... locales)
Add acceptable languages used in the invocation.
|
void |
setCredentials(String userName,
byte[] password)
Set basic auth username and password.
|
void |
setDigestCredentials(String userName,
byte[] password)
Set digest auth username and password.
|
void |
setEntity(Object entity,
RestMediaType mediaType)
Set the request entity for POST and PUT.
|
void |
setStackConfiguration(String name,
Object value)
Add a property supported by underlying REST stack implementation.
|
RestFuture send(Object entity, RestMediaType mediaType)
setEntity(Object, String) followed
by send() entity - Entity content for the PUT or POST requests.mediaType - Type of the supported media.RestFuture send()
WscMessagesend in interface WscMessagevoid setAccept(RestMediaType... mediaTypes)
mediaTypes - Accepted media types..void setAcceptLanguage(String... locales)
locales - Acceptable languages.void addHeader(String name, String value)
name - Name of the header.value - Value of the header.void setCredentials(String userName, byte[] password)
weblogic.security.Encrypt utility.userName - User name.password - Password.void setDigestCredentials(String userName, byte[] password)
weblogic.security.Encrypt utility.userName - User name.password - Password.void setStackConfiguration(String name, Object value)
name - Name of the property.value - Value of the property.void setEntity(Object entity, RestMediaType mediaType)
java.lang.String.
If the mediaType is application/xml, then the entity object should
be a groovy.lang.Closure as expected by bind() method
of groovy.xml.StreamingMarkupBuilder or a groovy.lang.Writable
object obtained from StreamingMarkupBuilder.
If the mediaType is application/json, then the entity object should
be any object expected by call() method of groovy.json.JsonBuilder or a
groovy.json.JsonBuilder object which is a groovy.lang.Writable.
Refer to Groovy api documentation for more information.
entity - Entity content for the PUT or POST requests.mediaType - Type of the supported media.