[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is <content> required on a POST?
Sam Ruby wrote:
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#" />
I don't see any use for posting a blank entry as a new entry.
Do we agree that *SOMETHING* more is required? If so, what?
Depends on the "type" or "purpose" of the Atom entry.
In the current Atom 0.2 spec, the following fields are defined as required:
* title
* link
* modified
* author
Since link, modified an author can all be derived by the web service
(user logged in, receipt of post date, and defining the link) that
leaves title as needing to be derived from somewhere.
My gut-feel suggest that at least one of the following is required:
* title
* content
Since that what is needed to have or generate a useful title. I don't
see much use in defining a title from link, modified nor author elements.
So a bare minimum POST request contains either:
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#">
<title/>
</entry>
OR
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#">
<content/>
</entry>
Mike.