HTTP GET header to simulate a cookie

Discussion in 'iOS Programming' started by itgiawa, Sep 4, 2008.

  1. macrumors newbie

    Sep 4, 2008
    I'm trying to get a feed from google reader following this guide:

    They tell me that I have to have a cookie with the following properties :
    name SID
    path /
    expires 1600000000

    If you don't have a http client API that support cookies, you can just add header lines that simulate this cookie in all other requests.

    But I dont know how to add a header to simulate this cookie

    [request setURL:[NSURL URLWithString:mad:""]];
    [request setTimeoutInterval:30.0];
    [request setHTTPMethod:mad:"GET"];
    [request addValue:(@"name=%@",SID) forHTTPHeaderField:mad:"Cookie"];

    The above code wont work...
    Can someone tell me what this guy means?


Share This Page