Skip to content

psContentTypeExpected - cJsonHttpTransfer

Specifies the expected content type of the response

Type: Property
Access: Read/Write
Data Type: String
Parameters: None

Syntax

Property String psContentTypeExpected
Access Type Syntax
Read Access: Get psContentTypeExpected to StringVariable
Write Access: Set psContentTypeExpected to StringVariable/Value

Description

The psContentTypeExpected specifies the expected content type of the received JSON response.

If the content received (psContentTypeReceived) does not contain the content type expected, a transfer error will occur and the peJsonTransferStatus property will be set to jtsInvalidContentType.

The default value of this property is 'application/json'.

If psContentTypeExpected is set to an empty string, any content type will be accepted. This may be required if the server returning the JSON data is not setting the proper content type.

Set psContentTypeExpected to "" // allow any content type