rest - What is better to use with cURL to make parameterized query -
i developing mobile application , i'm preparing server api. there search bar , user able search other people using mutliselects, inputs (just web form).
and question - type of http request appropriate send parametrized request server (using curl) , friends list response? thinking of using get, user able set multiple values 1 argument: state - user can select more 1 state
so thought using post request body in json format best. {"states":["state1", "state2", "state3", ...]}
but reffering http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-16#section-7.5:
post designed allow uniform method cover following functions:
o annotation of existing resources;
o posting message bulletin board, newsgroup, mailing list, or similar group of articles;
can advise type of query should use?
you can send multi-dimensional data in urls like:
http://g.com/p.php?arr[]=1&arr[]=2
see:
angularjs - how send multidimensional $http.get() data
for example.
Comments
Post a Comment