java - how to send request get method in play framework -
how send request method in play? have play framework application, , java desktop application. want send request java desktop play framework method get.
here's routes file play framework
# routes # file defines application routes (higher priority routes first) # ~~~~ # home page / application.index post /auth application.authenticator post /datacompany application.getdatacompany post /listdatafile application.getlistfile post /urlfile application.geturlfile /getfile/{id} application.getfile # ignore favicon requests /favicon.ico 404 # map static resources /app/public folder /public path /public/ staticdir:public # catch */{controller}/{action} {controller}.{action}
here's method in application controller play
public static void getfile(string id){ //string id = params.get("id"); system.out.println("id : "+id); fileinputstream stream = resumabledownloader.getfile(id); renderbinary(stream); }
oh , want send request get /getfile/{id} application.getfile
thank's , sorry bad english
you'll need use http client in java desktop application. check out httpclient: http://hc.apache.org/httpcomponents-client-ga/
Comments
Post a Comment