Reputation: 1086
sorry for a newbie question, but..
when I send the REST request to a localhost via http is there any chance to check what exactly this request consist of/ modify it before it reaches server.
No debugging is available.
if it was just web-client i'd simply use fiddler or somethings, what is the way to see the requests coming to a certain host from a mobile device?
UPDATE: currently ... I just need to see what is the format of JSON is coming out of application
Upvotes: 0
Views: 1016
Reputation: 718986
when I send the REST request to a localhost via http is there any chance to check what exactly this request consist of/ modify it before it reaches server.
I can think of a number of possibilities:
If you want to intercept and (potentially) modify the request, then you could use a web proxy service. (The snag is that you need to configure your client to send requests destined for the server via that proxy.)
In theory, if you are running on a system that uses packet filtering, you could route the TCP/IP stream through a local "service" that captured and maybe even rewrote the data.
Packet sniffer references:
Upvotes: 1
Reputation: 77186
You need to use a proxy server (a program that runs an HTTP server on some port, but instead of having Web pages of its own, it then goes and loads pages from another server). The choice of whether to use an existing server or to write a complete one (maybe in Ruby) depends on what you mean by "modifying" the requests and responses.
Upvotes: 0
Reputation: 3476
Make use of Logcat
You can log messages by using Log.d("tag", "msg");
You can also use Log.i("tag", "message"), Log.warn("tag", "message")
Upvotes: 0