tania
tania

Reputation: 1086

Analyze http rest request before in reaches server

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

Answers (3)

Stephen C
Stephen C

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:

Packet sniffer references:

Upvotes: 1

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

Vishal Pawale
Vishal Pawale

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

Related Questions