Results 1 to 4 of 4

Thread: Using HttpWebRequest (GET and POST) together

  1. #1

    Thread Starter
    Addicted Member SavedByGrace's Avatar
    Join Date
    May 2006
    Posts
    130

    Question Using HttpWebRequest (GET and POST) together

    -Resolved-
    Last edited by SavedByGrace; Oct 17th, 2010 at 07:06 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Using HttpWebRequest (GET and POST) together

    In future, please use the Code or VBCode buttons for code and the Quote button for quotes.

    As for the question, I've never done it so I don't know the details, but I believe that you need to use the CookieContainer property of the WebRequests to pass cookies from one request to another.

    http://www.google.com.au/search?q=ht...ient=firefox-a
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member SavedByGrace's Avatar
    Join Date
    May 2006
    Posts
    130

    Re: Using HttpWebRequest (GET and POST) together

    In future, please use the Code or VBCode buttons for code and the Quote button for quotes.
    I prefer to use quotes for the code - because the #'s that represent the line of code often cause a format nightmare in when copying and pasting into a coding enviroment (VB6 is a good example).

    I believe that you need to use the CookieContainer property of the WebRequests to pass cookies from one request to another.
    That's what I suspect too, but I have searched google for hours looking for a good example of how to do this and have searched nearly every post at vbforums that contains the "WebRequest" - A working example is what I'm after.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Using HttpWebRequest (GET and POST) together

    Quote Originally Posted by SavedByGrace View Post
    I prefer to use quotes for the code - because the #'s that represent the line of code often cause a format nightmare in when copying and pasting into a coding enviroment (VB6 is a good example).
    We would prefer that you use Code for code. The Quote tags don't format so your code loses all its indenting, making it harder for us to read. If you're concerned about ease of copying and pasting then just use Code rather than VBCode. Even if you use VBCode though, it's easy enough for others to just hit the Reply With Quote button and then they can copy your code without line numbers.
    Quote Originally Posted by SavedByGrace View Post
    That's what I suspect too, but I have searched google for hours looking for a good example of how to do this and have searched nearly every post at vbforums that contains the "WebRequest" - A working example is what I'm after.
    I know this topic has been discussed on this forum before, which is the only reason I knew about the CookieContainer in the first place, but I'm afraid that I can't tell you exactly where as I've never taken that much notice.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width