Parsing token in HTTP Response body using C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snehil
    New Member
    • Jun 2009
    • 19

    Parsing token in HTTP Response body using C#

    0 down vote favorite
    share [g+] share [fb] share [tw]


    I'm sending an HTTP POST request to google Client login and I'm getting this in respons:

    SID=DQAAAGgA... 7Zg8CTN
    LSID=DQAAAGsA.. .lk8BBbG
    Auth=DQAAAGgA.. .dk3fA5N

    I used the below code to read the response:

    Code:
    Trace.WriteLine(new StreamReader(response.GetResponseStream()).ReadToEnd());
    Now in this response i want to use only the value of Auth token. Can any one please help me on how to extract only that value from the response. Thanx!
Working...