buddycloud / buddycloud-http-api

The buddycloud API server written in Node.js
https://buddycloud.org/wiki/Buddycloud_HTTP_API
39 stars 17 forks source link

When POST posts to channel, response is 204 (No Content) rather than 201 (Created) #111

Open scholary-tim opened 11 years ago

scholary-tim commented 11 years ago

Replication Steps: Using a REST client (e.g. RESTClient in Firefox), send the following POST request (xml):

Headers: Basic Authentication [USERNAME/PASSWORD] URL: http://api.buddycloud.org/[USERNAME]@buddycloud.org/content/posts Body:

<entry xmlns="http://www.w3.org/2005/Atom">
  <content>Test post via RESTClient in FF 21.</content>
</entry>

Expected Outcome: Status Code: 201 (Created) Message posted to channel.

Actual Outcome: Status Code: 204 (No Content) Message posted to channel.

Reading http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html, it looks like 204 may well be fine, if so, I'd be happy to update https://buddycloud.org/wiki/buddycloud_HTTP_API#.2F:channel.2Fcontent.2F:node - Thanks.

scholary-tim commented 11 years ago

Following clarification with @lloydwatkin, it's believed this is an issue, and 201 (Created) should be returned instead. Thanks.