I am trying to send an HTTP GET request to VBA that contains a cookie containing a colon character, for example:
objReq.Open "GET", "http://my.url.com?foo=bar", False objReq.setRequestHeader "Cookie", "abcd=cookie:containing:colons" objReq.Send
Depending on what type of object I use for objReq , however, the request is handled differently.
The following object type works:
Dim objReq As MSXML2.ServerXMLHTTP Set objReq = New MSXML2.ServerXMLHTTP
Unfortunately, I need to use a different type of object (since MSXML2.ServerXMLHTTP cannot display enough HTTP redirect information). From what I read, I need to use Winhttp.WinHttpRequest , MSXML2.ServerXMLHTTP40 or MSXML2.ServerXMLHTTP60 , but using any of these objects, the following error occurs when the colons are included in the cookie value.

I tried replacing the colons with Chr(58) , %3A , and double quoting inside the string is useless. I also tried adding a Content-Type header with different character encodings, but this does not work either.
Does anyone know how I can send a cookie containing colons using Winhttp.WinHttpRequest , MSXML2.ServerXMLHTTP40 or MSXML2.ServerXMLHTTP60 ?
PS: Otherwise, if anyone knows how I can get the final URL of the redirect sequence when using MSXML2.ServerXMLHTTP , this will work too! Winhttp.WinHttpRequest will allow me to write the status code 302, and MSXML2.ServerXMLHTTP40 or MSXML2.ServerXMLHTTP60 will allow me to use GetOption(-1) , but MSXML2.ServerXMLHTTP does not support any of these methods (from what I can say).