Http request - username and password

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Zeropoint0
Newbie
Posts: 2
Joined: Sun Nov 03, 2013 8:46 pm

Http request - username and password

Post by Zeropoint0 » Sun Nov 03, 2013 8:55 pm

Please Tyme. Can you help me know how to get HttpRequest from this page. http://www.warforum.cz/viewforum.php?f=137 on this page goes over the USERNAME and PASSWORD. How can I enter Name and password and get HttpRequest from this http://www.warforum.cz/viewforum.php?f=137. We make several days.

Thank you very much

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Mon Nov 04, 2013 12:59 pm

What about this?
For basic authentication where a username and password is required by the server before the request will complete put the username and password in the URL using the following format:
http://username:[email protected] ... 37&start=0

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Nov 04, 2013 1:49 pm

That page doesn't use basic authentication. It uses a form post. You would need to set up the POST parms to mimic the form post.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Zeropoint0
Newbie
Posts: 2
Joined: Sun Nov 03, 2013 8:46 pm

Post by Zeropoint0 » Mon Nov 04, 2013 3:14 pm

Let>PostData=Username=123456789&Password=123456789

HTTPRequest>http://www.warforum.cz/login.php,,POST,PostData,Page

?????

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Nov 05, 2013 7:39 am

That looks right but is on going to retrieve the login page. The thing is this site, and most sites which require a login, probably uses a browser session state and probably also redirects to the page you want after login. None of that is going to happen with a single HTTP request.

In short you are going to have to automate this with WebRecorder instead.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Nov 05, 2013 1:25 pm

Yes, use one of the Extract functions. Specify the containing element - which could be BODY for the whole page, and then write the data to file using WriteLn.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

abby741
Newbie
Posts: 1
Joined: Mon Feb 03, 2014 12:18 pm
Location: java
Contact:

Post by abby741 » Mon Feb 03, 2014 12:41 pm

None of that is going to happen with a single HTTP request.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Feb 03, 2014 3:59 pm

abby741 wrote:None of that is going to happen with a single HTTP request.
Not sure if this is a question or you are making a point. Don't think the OP necessarily said it had to happen with one HTTP request. Looks to me like HTTP requests won't cut it anyway and instead a browser session may need to automated.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts