Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you look at <a href="https://stackoverflow.com/questions/6203231/which-http-methods-match-up-to-which-crud-methods">Which HTTP methods match up to which CRUD methods?</a> there shows the mapping </p> <pre><code>Create = PUT with a new URI POST to a base URI returning a newly created URI Read = GET Update = PUT with an existing URI Delete = DELETE </code></pre> <p>If you read the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html" rel="nofollow noreferrer">HTTP RFC</a> for each verb's definition you can see why...</p> <p>In response to: </p> <blockquote> <p>can I just send the person_id as a path parameter and not use any xml at all</p> </blockquote> <p>then ideally your URL </p> <blockquote> <p><code>http://serverName/PersonServices/Person/123456</code></p> </blockquote> <p>should probably be </p> <blockquote> <p><code>http://serverName/PersonServices/RevokePerson/123456</code></p> </blockquote> <p>This will help for maintainability <em>if you don't want to pass any XML/JSON/etc</em> but whether human-readable URLs are a feature of RESTful services is a <a href="http://ayende.com/blog/155009/rest-and-urls" rel="nofollow noreferrer">llloooonnnggg-running argument</a></p> <p>As alluded to in the comments RESTful APIs should focus on content and not actions. See: <a href="https://stackoverflow.com/questions/2173721/why-does-including-an-action-verb-in-the-uri-in-a-rest-implementation-violate-th">Why does including an action verb in the URI in a REST implementation violate the protocol?</a> for example.</p> <p>So you'd pass a person to a URL and based on the HTTP verb the relevant CRUD action is taken. If you want to pass just an ID then you're going to have to guess what update to take when you PUT to the ID... unless you know that there's never going to be any other update ever ever ever.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload