mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-27 07:49:28 +00:00
Added functions to make request easier
This commit is contained in:
parent
5dc34057f4
commit
00de759caf
@ -58,6 +58,26 @@ public class APIRequestParameters {
|
||||
parameters.add(new APIPostData(name, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new parameter to the request
|
||||
*
|
||||
* @param name The name of the new key
|
||||
* @param value The value of the new key (int)
|
||||
*/
|
||||
public void addParameter(String name, int value){
|
||||
this.addParameter(name, ""+value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new parameter to the request
|
||||
*
|
||||
* @param name The name of the new key
|
||||
* @param value The value of the new key (boolean)
|
||||
*/
|
||||
public void addParameter(String name, boolean value){
|
||||
this.addParameter(name, value ? "true" : "false");
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve request URI
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user