If the method succeeds, the return value is the length of the
header value in characters, not including the terminating null character.
If the header is undefined or the method fails, the return value is
zero. To get extended error information, call GetLastError.
If the header field does not exist, the error code will be
ST_ERROR_HEADER_NOT_FOUND.
The GetHeader method returns the value of a response
header from the last request made to the service provider.
This method is intended for applications that need lower-level access to
provider-specific response headers. Most applications do not need to
call this method. Standard response information, such as the HTTP
status code, response text, token usage, model name, and elapsed time,
is available through the API.
The headers returned by a service provider can vary depending on the
provider, model, endpoint, account configuration, and the specific request
being made. Applications should not assume that a particular header will
always be present unless it is documented by the service provider.
If the header field specified by lpszHeaderName was not
returned by the server, this method will return zero. If the
lpszHeaderValue parameter is not NULL, it will contain an empty
string when the method returns. The response headers are only
available after a request has been sent to the server.