headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.49k stars 160 forks source link

adds an XHR type request #55

Closed danmux closed 7 years ago

danmux commented 7 years ago

XHR mimics a xhr request by sending a request to the given URL using the method returning the response, body, content type and any error. XHR calls will use and update cookies but not dom, history or navigation.

This can be useful when wanting to reproduce an ajax request to the server, without reloading the current page or adding to the history.

twpayne commented 7 years ago

@danmux Why did you close this PR?

danmux commented 7 years ago

@twpayne it was a slightly wrong approach, I will push a new branch / PR soon