tags:

views:

115

answers:

1

Hi,

Could someone provide the basic code to use if I want to perform a http request on android to the address "address" with the string "message" ? Also I'd like to check the server response and perform some actions if the right conditions meet , but I ' m unsure of how and when the server send back the response . My guess is that the response is gotten in a blocking function, or in an asynchronous function . Could you provide code or information on this as well ? Great thanks from a novice with too much on his head !

A: 

The above refers to a more complex asynchronous way, but if you want something simple and blocking, that is basic core java - http://developer.android.com/reference/java/net/URL.html

see URL.getContent(), etc.

newton