wwHTTP::cExtraHeaders

Allows you to specify extra HTTP or SMTP headers when sending requests to Web Servers or SMTP serveres.

Any extra headers provided should be in the following key:value format:

Content-type: text/xml

and include a CRLF at the end of the line.

For SMTP users certain values may not be overridden reliably - all the values set by wwIPStuff.dll when sending email can be set but may or may not actually be used due to duplication. To see the headers that wwIPStuff sets send yourself an email and look at the headers with an email client like Outlook that shows you headers optionally.

o.cExtraHeaders

Example

oHTTP=CREATEOBJECT("wwHttp")

*** With a login and SSL and POSTing data to the server
oHTTP.AddPostkey("Name","Rick Strahl")
oHTTP.Addpostkey("Data","important message")

*** Optionally add custom headers
oHTTP.cExtraHeaders = ;
	oHTTP.cExtraHeaders + ;
	"cache-control: private" +CRLF +;
	"custom-header: custom data" + CRLF 

lcHTML = oHTTP.HTTPGet("https://www.west-wind.com/wc.wc?wwDemo~Authenticate",;
                       "joeuser","biteme")

See also:

West Wind Web Connection

© West Wind Technologies, 2023 • Updated: 04/05/05
Comment or report problem with topic