Unicode C
Unicode C
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Unicode C Downloads
#include <C_CkHttpW.h>
void ChilkatSample(void)
{
BOOL success;
HCkHttpW http;
const wchar_t *hdr1;
const wchar_t *hdr2;
success = FALSE;
http = CkHttpW_Create();
hdr1 = L"X-CSRF-Token";
hdr2 = L"X-Example";
CkHttpW_SetRequestHeader(http,hdr1,L"Fetch");
CkHttpW_SetRequestHeader(http,hdr2,L"123ABC");
wprintf(L"%s: %s\n",hdr1,CkHttpW_getRequestHeader(http,hdr1));
wprintf(L"%s: %s\n",hdr2,CkHttpW_getRequestHeader(http,hdr2));
// Output:
// X-CSRF-Token: Fetch
// X-Example: 123ABC
CkHttpW_Dispose(http);
}