How to catch XML packets that ConsoleExport Firebug extension sends?

125 views
Skip to first unread message

Željko Filipin

unread,
Dec 21, 2011, 12:38:16 PM12/21/11
to fir...@googlegroups.com
I have posted a question at Stack Overflow, but I did not get any replies in 4 days, so I am posting here too:


Any help is appreciated. You can post the answer here, if you do not like Stack Overflow.

Thanks,

Željko
--
watir.com/book - author

Sebo

unread,
Dec 22, 2011, 2:21:24 AM12/22/11
to fir...@googlegroups.com, odv...@gmail.com
I answered your question at stackoverflow.

@Honza:
While testing that out right now with the example I posted there, I saw the file being created, but there are no GET or POST parameters sent. Do you have an explanation for that?
Your description should be enhanced by the info how to handle the request.

Sebastian

Jan Honza Odvarko

unread,
Dec 22, 2011, 7:53:01 AM12/22/11
to fir...@googlegroups.com, odv...@gmail.com
On Thursday, December 22, 2011 8:21:24 AM UTC+1, Sebo wrote:
I answered your question at stackoverflow.

@Honza:
While testing that out right now with the example I posted there, I saw the file being created, but there are no GET or POST parameters sent. Do you have an explanation for that?
 I am not PHP expert, but I guess that's because the PHP script is wrong.

Note that the content-Type of the posted data is application/xml

Here is new version of the script that works for me:

<?php
  $filename = 'consoleexport.log';

  if (!$handle = fopen($filename, 'a'))
  {
    echo 'File "'.$filename.'" could not be opened';
    exit;
  }

  ob_start();
  $content = file_get_contents('php://input');
  $content .= "\n";
  ob_clean();

  if (!fwrite($handle, $content))
  {
    echo 'Can\'t write into file "'.$filename.'"';
    exit;
  }

  echo 'Done!';
  fclose($handle);
?>

Honza

 

Željko Filipin

unread,
Dec 22, 2011, 12:31:33 PM12/22/11
to fir...@googlegroups.com, odv...@gmail.com
Thanks Sebastian and Honza. Honza's script is working for me.

Željko

luyaan

unread,
May 14, 2012, 6:24:01 AM5/14/12
to fir...@googlegroups.com
Hi!

Is there a way by exporting the answers of a ajax request?
Currently I can export only the request urls, but I want to export also the answers delivered by the requests. Is that possible?

luyaan

unread,
May 14, 2012, 6:27:09 AM5/14/12
to fir...@googlegroups.com
Hi,

can I also export the ajax request answer? Currenty I am only able to export the request URL, but I also want the ajax answer. Is that possible?

Jan Honza Odvarko

unread,
May 14, 2012, 7:52:59 AM5/14/12
to Firebug
I guess that by "ajax request answer" you mean, HTTP response body,
correct?

1) You can try NetExport extension, which exports all data collected
by the Net panel
(including response bodies)
http://www.softwareishard.com/blog/netexport/

2) You can contribute a patch that implements that feature for Console
Export.
I think it could be pretty easy and I can help you with that.

Honza
Reply all
Reply to author
Forward
0 new messages