HTTPVersion Property
The HTTP Version used by the class.
Syntax
ANSI (Cross Platform) char* GetHTTPVersion();
int SetHTTPVersion(const char* lpszHTTPVersion); Unicode (Windows) LPWSTR GetHTTPVersion();
INT SetHTTPVersion(LPCWSTR lpszHTTPVersion);
@property (nonatomic,readwrite,assign,getter=HTTPVersion,setter=setHTTPVersion:) NSString* HTTPVersion; - (NSString*)HTTPVersion; - (void)setHTTPVersion:(NSString*)newHTTPVersion;
#define PID_HTTP_HTTPVERSION 24 IPWORKS_EXTERNAL void* IPWORKS_CALL IPWorks_HTTP_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_HTTP_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
"1.1"
Remarks
This property specifies the HTTP version used by the class. Possible values are:
- "1.0"
- "1.1" (default)
- "2.0"
When using HTTP/2 ("2.0") additional restrictions apply. Please see notes below for details.
HTTP/2 Notes
When using HTTP/2 only secure (TLS/SSL) connections are currently supported. Attempting to use a plaintext URL with HTTP/2 will result in an error.
If the server does not support HTTP/2 the class will automatically use HTTP/1.1 instead. This is done in order to provide compatibility without the need for any additional settings. To see which version was used check NegotiatedHTTPVersion after calling a method. The AllowHTTPFallback setting controls whether this behavior is allowed (default) or disallowed.
HTTP/2 is supported on Windows 8.1/Server 2012 R2 or later. If HTTP/2 is used on a version of Windows prior to these versions the class fails with an error.
Note: HTTP/2 is currently only supported on Windows.
This property is not available at design time.
Data Type
String