javascript - Getting response body for AJAX requests with SlimerJS -


i'm writing test using slimerjs website , need check response body coming server. i'm using following piece of code response:

 page.onresourcereceived = function (response) {             console.log(json.stringify(response));         }; 

i receive response since default prevent too memory usage slimerjs keeps response body empty receive empty body, unless tell not keep body empty formats using this:

webpage.capturecontent = [ /css/, /image\/.*/ ] 

i understand works files extensions css,jpg , avi, ajax response coming server. response in json format , response body left empty.

by looking @ response header can tell response type in text/html using following code can body.

page.capturecontent = [/text/, /html/] 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -