rest - Easier way to produce HTTPGET REQUEST URI on Android -
i'm trying make httpget
request rest server, url need send contains many parameters:
this uri :
http://darate.free.fr/rest/api.php?rquest=adduser&&login=samuel&&password=0757bed3d74ccc8fc8e67a13983fc95dca209407&&firstname=samuel&&lastname=barbier
i need login,password,first, name , last name user types, produce uri once above.
is there easy way create uri, without concatenate first part of uri http://darate.free.fr/rest/api.php?rquest=adduser
every &¶meter:value
i prefer use uri.builder
building uri
s. makes sure escaped properly.
my typical code:
uri.builder builder = uri.parse(base_uri).buildupon(); builder.appendpath(request_path); builder.builder.appendqueryparameter("param1", value); uri builturi = builder.build();
Comments
Post a Comment