Skip to content

Instantly share code, notes, and snippets.

@peterk
Created July 24, 2012 09:11
Show Gist options
  • Save peterk/3169014 to your computer and use it in GitHub Desktop.
Save peterk/3169014 to your computer and use it in GitHub Desktop.
<form action="/restcart/cart/12456" method="POST">
<input type="number" name="productNo" value="1">
<input type="text" name="description" value="An item">
<input type="number" name="price" value="19.95">
<input type="number" name="sku" value="123456789">
<input type="number" name="quantity" value="1" min="1" max="99" required>
</form>
@peterk
Copy link
Author

peterk commented Jul 24, 2012

Original from http://codebetter.com/glennblock/2011/05/09/hypermedia-and-forms/

<form>
  <url>/restcart/cart/12456</url>
  <method>POST</method>
  <mediatype>vnd-restcart+xml</mediatype>
  <item>
    <productNo>1</itemNo>
    <description>An item</description>
    <price>$19.95</price>
    <sku>123456789</sku>
  </item>
  <required>
    <quantity>1</quantity>
  </required>
</form>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment