PutTextResponseText
Puts a text document, expects a Text response.
Service | Operation |
---|---|
httpClient | PUT_TEXT_RESPONSE_TEXT |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var serviceCode = "webService";
var path = "resource/dir";
var query = {
"parmName": "value"
};
var headers = {
"headerName": "value"
};
var text = "text string";
var httpClientProxy = bridge.getHttpClientServiceProxy();
var postResult = httpClientProxy.putTextResponseText(serviceCode, path, query, headers, text);
if (postResult.status == 200) {
// Success!
}
var serviceCode = "webService";
var path = "resource/dir";
var query = {
"parmName": "value"
};
var headers = {
"headerName": "value"
};
var text = "text string";
var httpClientProxy = bridge.getHttpClientServiceProxy();
var postResult = httpClientProxy.putTextResponseText(serviceCode, path, query, headers, text);
if (postResult.status == 200) {
// Success!
}
JSON Response
{
"data": {
"text": "text message",
"statusCode": 200
},
"status": 200
}
Method Parameters
Parameter | Description |
---|---|
serviceCode | Service code of the external service configured in the Cloud Code - Web Services section of the portal |
path | Path to append to the Base URL of the service |
query | Map of query parameters |
headers | Map of extra headers |
text | Text to post |