Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Function kcHttpGetVersion

The function kcHttpGetVersion returns the version of the HTTP request. The version is returned in the form in which it is contained in the HTTP protocol, e.g. 'HTTP/1.1'.

This function may be called both in program unit and HTTP exit program.
In the program unit the function may only called in the first program unit run of a service.

Function declaration kcHttpGetVersion
kc_http_retcode kcHttpGetVersion( char *  httpVersion,
                                  int *   httpVersionLth
                                );
This function has following function parameter:
<<httpVersionThe pointer to a buffer in which the version of the HTTP request is returned. The length of the buffer must be at least httpVersionLth bytes.
<>httpVersionLth
The pointer to a variable in which the length of the buffer for the version of the HTTP request is passed and the actual length of the version is returned.
Description of returned value of function call:

KC_HTTP_OK

The function has successfully terminated.

KC_HTTP_FUNCTION_CALL_NOT_ALLOWED

The function was called by the KDCS program unit before the KDCS call INIT was executed or not in the first program unit run or outside an HTTP exit program.

KC_HTTP_NO_HTTP_CLIENT

The calling service was not initiated by an HTTP client.

KC_HTTP_PARAM_VALUE_NULL

The pointer to the buffer for the version httpVersion or the pointer to the length of the version httpVersionLth is NULL.

KC_HTTP_INVALID_LENGTH

The value of the length of version httpVersionLth is lower or equal 0.

KC_HTTP_RESULT_TRUNCATED

The length of the buffer for the version is less than the actual length of the version. The version is truncated and the actual length is returned.