cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl to login with POST and redirect

From: LoD MoD <lodmod.dod_at_gmail.com>
Date: Mon, 7 Dec 2009 18:17:19 -0800

I take it I will need to create a custom script using libcurl or
pycurl for this?

On Mon, Sep 21, 2009 at 11:00 AM, LoD MoD <lodmod.dod_at_gmail.com> wrote:
> I am trying to access a page that requires authentication. It first
> does a POST to log in and then requests the page. I am getting the
> login page as a response, so I think my command is formed improperly.
> Any help is appreciated.
>
> Here is the curl command:
> curl -d 'j_character_encoding=UTF-8&j_password=password&j_username=weblogic'
> -L http://myweblogicserver:7001/console/console.portal?_nfpb=true&_pageLabel=WebAppModuleMonitorPage&WebAppMonitorRunningPortlethandle=com.bea.console.handles.ModuleHandle%28%22com.bea%3AName%3DMyEAR2%2CType%3DAppDeployment%3Bpublish%3B%2F%3B%3Cnone%3E%3BWEBAPP%22%29"
>
> here is the POST data on a successful login using Firebug:
> j_character_encodingUTF-8
> j_password password
> j_username weblogic
> The response I get is the login page, without a successful authentication.
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-08