setRequestBodyFromAttachment - How does it work?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2016 05:02 PM
Hi everyone,
I want to know that how does setRequestBodyFromAttachment method works? I know how to use it but I just want to know what actually happens at the backend?
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('post');
request.setEndpoint('http://myendpoint');
request.setRequestBodyFromAttachment('attachment-GUID');
request.setMIDServer('my_mid_server');
var response = request.execute();
var httpResponseStatus = response.getStatusCode();
so when I fire the above code, MID server will pick it up, fetch the attachment and POST it to the endpoint.
My question is - how does that POST happens?
- Is it using base64 encoding?
- Or file is streamed to the endpoint?
- Or is it sent as a multiform data content?
- Or something else happens?
Thanks in advance.
Labels:
- Labels:
-
Integrations
-
Scripting and Coding