set, request, attachment, api, request, send, soap, rest, get, post, put, delete

Method SetRequestAttachment

API

Sets Request Attachment

Watch this video to learn how to use this method

Have a problem with playback?
SetRequestAttachment sets API request attachment during the runtime The input parameters are String attachment name, string path and string type Let's use ConcatArrayData API method for demonstration purposes. We can see by default there are no attachments in it. Let's set some random attachment to this request We set attachment with name as "name", path as "testpath" and type as "type 123" we will set a breakpoint to pause the script during runtime Run and we can see new attachment appears.

Usage

Function SetRequestAttachment(
    String Name,
    String Path,
    String Type
)

CreateBook

SetReque...ment

book

C:\book.txt

text/plain

Name

Path

Type

Parameters

Name

Type: String

The name of the Attachment

Path

Type: String

The new path to set

Type

Type: String

The new MIME Type to set

Returns

No return value

Example

VBScript

Server("API Server").Method("CreateBook").SetRequestAttachment "book", "C:\book.txt", "text/plain"

JavaScript

Server("API Server").Method("CreateBook").SetRequestAttachment("book", "C:\book.txt", "text/plain");

CreateBook

SetReque...ment

book

C:\book.txt

text/plain

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227