#1 2026-02-02 16:21:15

mrbar2000
Member
From: Brazil
Registered: 2016-10-26
Posts: 122

How to replace Header item?

set some defaults to http
http.HeaderAdd(cREST_HEADER_CONTENTTYPE, cREST_CONTENTTYPE_JSON);
http.HeaderAdd(cREST_HEADER_SOAPACTION, cREST_SOAPACTION_ADD);

in other moment

http.HeaderAdd(cREST_HEADER_CONTENTTYPE, cREST_CONTENTTYPE_XML);

HEADERS:
Content-Type: application/json
SOAPAction: "add"
Content-Type: application/xml


I whould like replace content-type item

Offline

#2 2026-02-02 18:46:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,401
Website

Re: How to replace Header item?

In which context?

Offline

#3 2026-02-03 11:52:51

mrbar2000
Member
From: Brazil
Registered: 2016-10-26
Posts: 122

Re: How to replace Header item?

I have created a interface and class REST/SOAPClient to wrapper THttpClientSocket. then by default i use json contenttype, but some part of code need pass xml to content type.

I need replace the header item.

Offline

Board footer

Powered by FluxBB