Skip to content

A simple http post async request helper for basic android application

Notifications You must be signed in to change notification settings

texx00/SimpleHTTPPostRequest-Android-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Async HTTP Post Request

This class is an easy way to perform an async HTTP POST request.

This want to be a class for beginners and may be too simple for your needs.

With only few lines is possible to perform a basic request with as many parameters as you want.

How to use

Download and import the HTTPPostTask.class in your package then:

HTTPPostTask.HTTPPostTaskListener listener=new HTTPPostTask.HTTPPostTaskListener(){

	@Override
    public void onDataReceived( String result ) {
    	...  
    }
    
    @Override
    public void onError(Context c){
    	/*	what to do if an error occurs	*/
    }
}
HTTPPostTask task=new HttpPostTask(context, url, listener);
task.addPostParam(name1, value1);
task.addPostParam(name2, value2);
...
task.execute();

The repository include a complete example (with json) (app and serverside)

I'm open to any suggestion or question ;) Tell me if I'm doing something wrong or if something can be added

About

A simple http post async request helper for basic android application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published