I am trying to access a HTTP header. but I am not able to succeed. I am trying to access the "Set-Cookie" header sent by my server.
RHTTPResponse resp = aTransaction.Response();
RStringPool strP = aTransaction.Session().StringPool();
RHTTPHeaders hdr = resp.GetHeaderCollection();
RStringF fieldNameStr = strP.OpenFStringL(_L8("Set-Cookie"));
if (hdr.GetField(fieldNameStr,0,fieldVal) == KErrNone)
RStringF fieldValStr = strP.StringF(fieldVal.StrF());
TDesC8& val = (TDesC8&)fieldValStr.DesC();
HBufC* buf = HBufC::NewL(100);
Now .. the "buf" I am getting is nowhere what my server is sending .. its sending me a cookie .. which is a very long string of alphanumeric characters .. but what I get is "Cookie" . .a single word ..
can someone please find the issue in the above code.
thanks a lot in advance.