Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35759
| Path | csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| 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 | Fri, 14 Oct 2016 21:16:57 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 32 |
| Message-ID | <ntref6$574$7@dont-email.me> (permalink) |
| References | <m3lgxr8681.fsf@saunalahti.fi> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 14 Oct 2016 20:16:38 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="1abf80d047cf401ea9626e7850440608"; logging-data="5348"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cYMiQk2od1+ZVpUAnFTZa" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
| In-Reply-To | <m3lgxr8681.fsf@saunalahti.fi> |
| Cancel-Lock | sha1:nyw0OgYSDN7w8ZbSLYFH4ZQoiOc= |
| Xref | csiph.com comp.lang.java.programmer:35759 |
Show key headers only | View raw
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