Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.koushikdutta.ion.builder;
  
  import  android.app.ProgressDialog;
  import  android.os.Handler;
  import  android.widget.ProgressBar;
  
  import  org.json.JSONObject;

Created by koush on 5/30/13.
  // set parameters
Enable logging for this request

Parameters:
tag LOGTAG to use
level Log level of messages to display
Returns:
 
     public IonBodyParamsRequestBuilder setLogging(String tagint level);

    
Callback that is invoked on download progress
 
     public interface ProgressCallback {
         void onProgress(int downloadedint total);
     }

    
Specify a callback that is invoked on download progress. This will not be invoked on the UI thread.

Parameters:
callback
Returns:
 
     public IonBodyParamsRequestBuilder progress(ProgressCallback callback);

    
Specify a callback that is invoked on download progress. This will be invoked on the UI thread.

Parameters:
callback
Returns:
 
     public IonBodyParamsRequestBuilder progressHandler(ProgressCallback callback);

    
Specify a ProgressBar to update during the request

Parameters:
progressBar
Returns:
 
     public IonBodyParamsRequestBuilder progressBar(ProgressBar progressBar);

    
Specify a ProgressDialog to update during the request

Parameters:
progressDialog
Returns:
 
     public IonBodyParamsRequestBuilder progressDialog(ProgressDialog progressDialog);

    
Post the Future callback onto the given handler. Not specifying this explicitly results in the default handle of Thread.currentThread to be used, if one exists.

Parameters:
handler Handler to use or null
Returns:
 
     public IonBodyParamsRequestBuilder setHandler(Handler handler);

    
Set a HTTP header

Parameters:
name Header name
value Header value
Returns:
 
     public IonBodyParamsRequestBuilder setHeader(String nameString value);

    
Add an HTTP header

Parameters:
name Header name
value Header value
Returns:
 
     public IonBodyParamsRequestBuilder addHeader(String nameString value);

    
Specify the timeout in milliseconds before the request will cancel. A CancellationException will be returned as the result.

Parameters:
timeoutMilliseconds Timeout in milliseconds
Returns:
 
     public IonBodyParamsRequestBuilder setTimeout(int timeoutMilliseconds);

    
Specify a JSONObject to send to the HTTP server. If no HTTP method was explicitly provided in the load call, the default HTTP method, POST, is used.

Parameters:
jsonObject JSONObject to send with the request
Returns:
 
     public IonFutureRequestBuilder setJSONObjectBody(JSONObject jsonObject);
    
Specify a String to send to the HTTP server. If no HTTP method was explicitly provided in the load call, the default HTTP method, POST, is used.

Parameters:
string String to send with the request
Returns:
New to GrepCode? Check out our FAQ X