[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is <content> required on a POST?
From: "Sam Ruby" <rubys@xxxxxxxxxxxxxxxx>
>
> My concern is that if you can't depend on anything then, well then, you
> can't depend on anything!
>
> Let's take a step back... is the following valid? If so, what does it
mean?
>
> POST /reilly HTTP/1.1
> Content-Type: application/x.atom+xml
>
> <?xml version="1.0" encoding='iso-8859-1'?>
> <entry xmlns="http://purl.org/atom/ns#" />
>
> Do we agree that *SOMETHING* more is required? If so, what?
(Assumptions: (1) the use of POST is wrt to the current API, i.e. to create
an entry. (2) we are not currently talking about editing an entry.)
A suggestion similar to the one François made: When you want to create an
entry, you first perform a GET on the <create-entry/> URI. A "template" Atom
document is returned containing the elements it expects from you, all of
which contain "default" values. The client can then modify all the elements
that it recognizes, leaving the rest as-is. The client can add additional
elements, but the server may choose to ignore them (or may choose to store
them as-is to allow a client to append arbitrary metadata). If the client
leaves out any of the elements in the template, the server returns a 400 Bad
Request.
---
Seairth Jacobs (seairth@xxxxxxxxxxx)
Looking: http://www.seairth.com/blog/65