mbreyno has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a script which will send a POST request to deja.com to post articles from the command line. Unfortunately, deja.com requires you to log in before they will post your article. Is there any way to pass your user data (a cookie) along with the POST request so that deja.com will think that I am logged in?
  • Comment on Seeking a wise way to pass a cookie on a POST request

Replies are listed 'Best First'.
Re: Seeking a wise way to pass a cookie on a POST request
by anithri (Beadle) on Feb 17, 2000 at 22:22 UTC
    Assuming you are using LWP (and if you aren't, why not?) you can set a cookie_jar option. see the LWP documentation for more details
Re: Seeking a wise way to pass a cookie on a POST request
by Crulx (Monk) on Feb 18, 2000 at 12:40 UTC
    If you are just directly connecting with a socket, you just need to send the cookie as defined by the RFC before the header ends. The browser usually sends that for you when you make an http connection.
    ---
    Crulx
    crulx@iaxs.net