wwHTTP::nHttpServiceFlags

Flags that are used on the HTTP connection in WinInet. This method is needed to pass options that require setting values. For option switches you can use the .nHttpServiceFlags or .nServiceFlags settings instead.

Typically SetOption() has to be called from within an active request because it needs a connection handle, which means you have to subclass wwHttp and override the OnHttpPostConnect() method.

Option values are WinInet constants which can be found here:

WinInet Option Flags (Microsoft Docs)

o.nHttpServiceFlags

Remarks

You can set multiple flags by adding them (or in some cases use BITOR())

Here are a few common flags you might want to set from wconnect.h.

#DEFINE INTERNET_FLAG_RELOAD            		2147483648
#DEFINE INTERNET_FLAG_SECURE            		8388608
#define INTERNET_FLAG_KEEP_CONNECTION       	0x00400000
#DEFINE INTERNET_FLAG_NO_AUTO_REDIRECT		 	0x00200000 
#DEFINE INTERNET_FLAG_NO_COOKIES                0x00080000

#DEFINE INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  0x00002000
#DEFINE INTERNET_FLAG_IGNORE_CERT_CN_INVALID    0x00001000
#DEFINE INTERNET_FLAG_NO_COOKIES                0x00080000  

Example

<<code lang="VFP">>loHttp = CREATEOBJECT("wwHttp")

*** Assign a flag value (from wconnect.h or 0x00800000)
loHttp.nHttpServiceFlags = INTERNET_FLAG_NO_COOKIES 

*** Combine multiple values by adding them together
*loHttp.nHttpServiceFlags = INTERNET_FLAG_NO_COOKIES + 0x00400000

lcHtml = loHttp.HttpGet("http://west-wind.com")<</code>>

See also:

West Wind Web Connection | wwHttp::nServiceFlags |

© West Wind Technologies, 1996-2024 • Updated: 08/28/20
Comment or report problem with topic