Added functions to make request easier

This commit is contained in:
Pierre 2018-01-07 12:14:06 +01:00
parent 5dc34057f4
commit 00de759caf

View File

@ -58,6 +58,26 @@ public class APIRequestParameters {
parameters.add(new APIPostData(name, value)); 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 * Retrieve request URI
* *