Skip to content

pbClearHeaders - cJsonHttpTransfer

Determines if Http Headers should be cleared after JSON data is posted

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

Syntax

Property Boolean pbClearHeaders
Access Type Syntax
Read Access: Get pbClearHeaders to BooleanVariable
Write Access: Set pbClearHeaders to BooleanVariable/Value

Description

pbClearHeaders determines if the message ClearHeaders should be sent after posting JSON data. By default, this value is True and headers are cleared as part of the post.

After JSON data is posted, the HTTP headers must be cleared. If this is not done, you may receive an error message when you attempt to post data a second time.

In rare cases, you may wish to create additional headers using the AddHeader method. In such a case, you must disable the automatic clearing of headers (set pbClearHeaders to false), clear the headers yourself (send ClearHeaders) and then add whatever headers you wish (send AddHeader).

Object oJsonHttpTransfer is a cJsonHttpTransfer
    Set pbClearHeaders to False
End_Object
:
Send ClearHeaders of oJsonHttpTransfer
Get AddHeader of oJsonHttpTransfer "MyName" "MyValue" to bRetVal
Get HttpPostJson of oJsonHttpTransfer sHost sFilePath hoJsonRequest (&bOk) to hoJsonResponse