0

I have the URL / Request Header / POST contents . Is it possible for me to sent the query to the server and get the output HTML and Javascript ? This is a AJAX stuff , but still I think we can emulate using HTTP .

Is there a convenient method for this using Python ? Or is there a GUI tool , that would just lee enter the all the REQUEST HEADER options and also the POST contents and get the desired output ?

Nishant
  • 20,354
  • 18
  • 69
  • 101

3 Answers3

1

In Python you also have Google's httplib2 which has a higher level interface than urllib2. For further detail see Python urllib vs httplib?

Community
  • 1
  • 1
user3139774
  • 1,295
  • 3
  • 13
  • 24
1

You can use "wget" which should be available for most distros.

Read up on --post-file and --header.

http://linux.die.net/man/1/wget

brain
  • 2,507
  • 1
  • 13
  • 12
1

On perl you have LWP::UserAgent module. Python have sth similar urllib2 (it should be in core libraries). You may also need "Beautiful Soup" for html/xml parsing.

Ernest Staszuk
  • 214
  • 1
  • 2
  • Will look at urllib . I am not looking for parsing , basically I am trying to reproduce the server side issues for which I dont need HTML to be rendered - HTML output would be error page most of the cases which I am checking . – Nishant Sep 15 '11 at 10:15