get, request, attachment, type, api, request, response, send, soap, rest, get, post, put, delete

Method GetRequestAttachmentType

API

Gets Request Attachment MIME Type value

Watch this video to learn how to use this method

Have a problem with playback?
GetRequestAttachmentType returns API request attachment type The input is string Name Let's see Sum API method We can see there is one attachment configured Name is Test, type is "application/octet-stream" So we will use GetRequestAttachmentType along with messagebox to read and output this value during runtime. Run the script and we can see the message box shows "application/octet-stream"

Usage

Function GetRequestAttachmentType(
    String Name,
    Boolean Report [Optional]
)

CreateBook

ZAP Object step

GetReq...Type

book

True

type

Name

Report

Output Parameter

Parameters

Name

Type: String

The name of the Attachment

Report (optional)

Type: Boolean

Default Value: False

Generate report for this step

Returns

Attachment MIME Type

Example

VBScript

msgbox Server("API Server").Method("CreateBook").GetRequestAttachmentType("book", True)

JavaScript

alert(Server("API Server").Method("CreateBook").GetRequestAttachmentType("book", true));

CreateBook

ZAP Object step

GetReq...Type

book

True

type

Script-Less next step

ZAP Utility

ZAP Utility step

Zap.Comm...Box

Zap.Var...("type")

Contact Us

3150 Roswell Rd NW

Atlanta, GA, 30305, USA

(800) 795-3552