HTTP GET header to simulate a cookie

Discussion in 'iPhone/iPad Programming' started by itgiawa, Sep 4, 2008.

  1. macrumors newbie

    Joined:
    Sep 4, 2008
    #1
    I'm trying to get a feed from google reader following this guide:
    http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI

    They tell me that I have to have a cookie with the following properties :
    name SID
    domain .google.com
    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:"http://www.google.com/reader/atom/user/-/state/com.google/reading-list"]];
    [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?

    Thanks!
     

Share This Page