3 Replies - 379 Views - Last Post: 29 August 2013 - 01:53 PM Rate Topic: -----

#1 SaturnsVoid  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 26-July 11

Read Cookies into a String?

Posted 29 August 2013 - 09:51 AM

Ok so i am making my program log into my website using HttpWebRequest. I need to find and maybe run a case statement for a Cookie in my CookieContainer.

Here is what i am trying to do in steps:
  • POST Login information to site
  • Recive a Cookie
  • Check cookies data (in a String)
  • Do Magic


I tried searching for it and i can't seem to find anything... Maybe i search the wrong keywords?

Is This A Good Question/Topic? 0
  • +

Replies To: Read Cookies into a String?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8379
  • View blog
  • Posts: 31,145
  • Joined: 12-June 08

Re: Read Cookies into a String?

Posted 29 August 2013 - 09:58 AM

What part of that are you having problems with? If you createa a 'cookiecontainer' object, attach it to your httpwebrequest object and make your call it should be filled when done.
Was This Post Helpful? 0
  • +
  • -

#3 SaturnsVoid  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 26-July 11

Re: Read Cookies into a String?

Posted 29 August 2013 - 01:49 PM

View Postmodi123_1, on 29 August 2013 - 09:58 AM, said:

What part of that are you having problems with? If you createa a 'cookiecontainer' object, attach it to your httpwebrequest object and make your call it should be filled when done.

I have the cookie loaded into the cookiecontainer from the response of the request... What i want to be able to do is check if the Cookie EXAMPLE exists and if it does see if the value of it equals anything i have as a string.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8379
  • View blog
  • Posts: 31,145
  • Joined: 12-June 08

Re: Read Cookies into a String?

Posted 29 August 2013 - 01:53 PM

Okay.. how about using a 'for each' with a variable of type 'cookie' that goes through all the cookie_container object's .cookies property.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1