Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35759
| From | 4ndre4 <626401fd-4bc7-4f8f-b641-563ae0f72920@626401fd-4bc7-4f8f-b641-563ae0f72920.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Rest parameter without value |
| Date | 2016-10-14 21:16 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <ntref6$574$7@dont-email.me> (permalink) |
| References | <m3lgxr8681.fsf@saunalahti.fi> |
On 14/10/2016 13:28, Jukka Lahtinen wrote: [...] > I have been working with java, but REST is new to me. [...] > I have used an url like this: > http://machine/path/v3.0/keyvalue > (where "keyvalue" is the variable path parameter and the url is > otherwise constant) It does not really make sense. REST is based on the concept of "resource". Typically, you have something like: http://somehost/somepath/users (a GET returns the list of users, a POST create a new user) http://somehost/somepath/user/user-id (a GET returns the user, a PUT updates the user) etc.. Another important concept is HATEOAS. I suggest that you read up about correct REST API construction. There's plenty of resources around. For example, the following links: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#restful http://restful-api-design.readthedocs.io/en/latest/resources.html -- 4ndre4
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Rest parameter without value Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2016-10-14 15:28 +0300
Re: Rest parameter without value Arne Vajhøj <arne@vajhoej.dk> - 2016-10-14 14:49 -0400
Re: Rest parameter without value Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2016-10-17 08:48 +0300
Re: Rest parameter without value Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2016-10-17 09:50 +0300
Re: Rest parameter without value 4ndre4 <626401fd-4bc7-4f8f-b641-563ae0f72920@626401fd-4bc7-4f8f-b641-563ae0f72920.invalid> - 2016-10-14 21:16 +0100
Re: Rest parameter without value Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2016-10-17 08:30 +0300
csiph-web