2013-06-06

record and mock http interactions of third-party server

* Can not setup env in home. so i can not debug my application at home remotely

I am debugging and web application, but I need an ESP fast server to
always return XML data for my search, then I can debug things.

but i can not access the fast server at home, so i can not work remotely at home.

I want have an application to monitor my web application's interactions with
fast server, and recording the interacting data(including delays),
and can replay/mock the services at home.

* python -m SimpleHTTPServer 9000
* http://localhost:9000/null_main.c
* sudo justniffer -i lo0 -r -p "port 9000"
GET /null_main.c HTTP/1.1
Host: localhost:9000
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
If-Modified-Since: Sat, 20 Oct 2012 09:17:23 GMT

HTTP/1.0 200 OK
Server: SimpleHTTP/0.6 Python/2.7.1
Date: Thu, 06 Jun 2013 13:27:41 GMT
Content-type: text/plain
Content-Length: 46
Last-Modified: Sat, 20 Oct 2012 09:17:23 GMT

/* null_main.c */

int main() {
  return 0;
}

* TODO need running the mock server according the recorded http data

-->

No comments:

Post a Comment