<< Fare clic per visualizzazione il sommario >> Percorso: API di piattaforma > Altri servizi > Rest > SendMultipart |
Service
Method
SendMultipart
Description
Invokes a REST service with multiple contents and returns a string contains the service output.
Input |
|||
Name |
Description |
Type |
Optional |
baseUrl |
The base url of the REST service (ex.: “https://api.twitter.com/1.1/”). Required, unless specified in the “BaseUrl” configuration field. |
String |
|
resource |
The resource (ex.: “statuses/show.json”). Required, unless specified in the “Resource” configuration field. |
String |
|
parameters |
Resource parameters, separated by the & character (ex.: “?id=210462857140252672&trim_user=true”). Methods ParametersToString, Detokenize or SimpleDetokenize can be used to get this string. |
String |
|
method |
The request method to use to contact the REST resource ("POST", "PUT", ...). Defaults to "POST". |
String |
|
stringNames |
Names of the string contents of the same index. |
List of string |
|
stringContentTypes |
Content types of the string contents of the same index. |
List of string |
Y |
stringContents |
String contents. |
List of string |
|
streamNames |
Names of the stream contents of the same index (optional, each name defaults to "file"). |
List of string |
|
streamContentTypes |
Content types of the stream contents of the same index (optional, defaults to "application/octet-stream"). |
List of string |
|
fileNames |
File names of the stream contents of the same index. |
List of string |
|
streamContents |
Stream contents. |
List of reference |
|
host |
The Host header value to use in the HTTP request independent from the request URI; it consists of a hostname and an optional port number (ex.: “www.contoso.com:8080″). Defaults to the “Host” configuration field, if specified, otherwise it is derived from baseUrl. |
String |
|
userAgent |
The user-agent header value (ex.: “.NET Framework Test Client”). Defaults to the “UserAgent” configuration field, if specified. |
String |
|
timeout |
The number of milliseconds to wait before the request times out. Defaults to the “Timeout” configuration field, if specified, otherwise to 100000 (100 seconds). |
Int |
|
maximumAutomaticRedirections |
The maximum number of redirection responses that the request follows; -1 indicates automatic redirections are not allowed. Defaults to the “MaximumAutomaticRedirections” configuration field, if specified, otherwise to 50. |
Int |
|
maximumResponseHeadersLength |
The maximum allowed length of the response headers, in kilobytes (1024 bytes); a value of -1 means no limit is imposed on the response headers received. Defaults to the “MaximumResponseHeadersLength” configuration field, if specified, otherwise to 64. |
Int |
|
headers |
Additional headers for the HTTP request; for example, it can contain the “Authorization” header for the “OAuth” authentication (see http://tools.ietf.org/html/rfc5849#section-3.5.1 and http://hueniverse.com/oauth/guide/authentication/). It can also contain the standard headers "Method", "ContentType", "Host", "UserAgent", "Timeout", MaximumAutomaticRedirections", "MaximumResponseHeadersLength" and "Accept", but if there are corresponding parameters with non-null values, they prevail. |
Dataset |
|
credentialsType |
Type of the authentication credentials associated with the request: 1 = None (credentials not required or otherwise specified, maybe through the "Authorization" header) 2 = NetworkCredentials ("userName" and "password" must be specified) 3 = DefaultNetworkCredentials (the network credentials of the current security context) 4 = DefaultCredentials (the system credentials of the application) 5 = BasicAuthentication ("UserName" and "Password" must be specified) Defaults to the "CredentialsType" configuration field, if specified, otherwise to 1 (None). |
Int |
|
userName |
User name (required if “CredentialsType” = 2 or 5). Defaults to the “UserName” configuration field, if specified. |
String |
|
password |
Password (required if “CredentialsType” = 2 or 5). Defaults to the “Password” configuration field, if specified. |
String |
|
Output |
|||
Name |
Description |
Type |
Optional |
returnValue |
A string containing the service output. |
String |
|
Remarks
If only the complete url is available (not its baseUrl and resource parts), it can be passed in anyone of the two parameters (baseUrl or resource) leaving the other empty.
The output string can be in various formats (Json, XML, CSV, HTML and others): if desired, the appropriate transformations can be requested with other methods JsonToDictionary, XmlToDictionary and CsvToList.