Modifier and Type | Method and Description |
---|---|
HttpRequest |
newHttpRequest(String connectionName)
Create a new HTTP request corresponding to the given
connectionName (local, vault-to-vault, or external connection). |
HttpRequest |
newLocalHttpRequest()
Create a new HTTP request to represent a connection to the current vault as the current user.
|
HttpOperation<CsvData> |
send(HttpRequest httpRequest,
CsvReadParameters csvReadParameters)
Creates an operation to send the specified HTTP request and convert the response body specifically
to
CsvData using the given custom csvReadParameters . |
<T> HttpOperation<T> |
send(HttpRequest httpRequest,
HttpResponseBodyValueType<T> valueType)
Creates an operation to send the specified HTTP request and convert the response body to the given
valueType . |
HttpRequest newLocalHttpRequest()
HttpRequest newHttpRequest(String connectionName)
connectionName
(local, vault-to-vault, or external connection).connectionName
- name of a local, vault-to-vault, or external connection.
Must be a connection with "active" lifecycle state. Cannot be null or empty.<T> HttpOperation<T> send(HttpRequest httpRequest, HttpResponseBodyValueType<T> valueType)
valueType
.
You can specify the ways success and error are handled
on the returned HttpOperation
. Once success-handling and
error-handling is specified, you can call HttpOperation.execute()
to send the HTTP request. For example:
httpService.send(httpRequest, STRING).ignoreError().execute()
T
- HTTP response body typehttpRequest
- httpRequest to execute. Cannot be null.valueType
- the type to which response body must be converted to. Cannot be null.HttpOperation<CsvData> send(HttpRequest httpRequest, CsvReadParameters csvReadParameters)
CsvData
using the given custom csvReadParameters
.
If there is no need to customize CsvReadParameters
, you may simply use
send(HttpRequest, HttpResponseBodyValueType)
.
You can specify the ways success and error are handled
on the returned HttpOperation
. Once success-handling and
error-handling is specified, you can call HttpOperation.execute()
to send the HTTP request. For example:
httpService.send(httpRequest, csvReadParameters).ignoreError().execute()
httpRequest
- httpRequest to execute. Cannot be null.csvReadParameters
- custom CSV read parameters to use to convert response body to CsvData. Cannot be null.Copyright © Veeva Systems 2017–2019. All rights reserved.