[Building Sakai] A note about POSTing data to EntityBroker

Matthew Buckett matthew.buckett at oucs.ox.ac.uk
Fri Mar 23 03:52:21 PDT 2012


On 23 March 2012 00:00, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
> Hi all,
>
> I've just spent a considerable amount of time battling through an issue I
> had with POSTing data to EntityBroker, in order to create entities.
>
> To cut a long story short, you need to ensure the content type is being set
> correctly otherwise you will get unexpected results like the object being
> created but no data being populated.
>
>  In the case of JSON, it must be:
> application/json; charset=utf-8

Is there a reason why from a design point of view it should fail with:
Content-Type: application/x-www-form-urlencoded ?

To me this sounds like a bug in entity broker that should either
support additional content type or throw a nice error saying you need
to switch to a different content-type.

-- 
  Matthew Buckett
  VLE Developer, LTG, Oxford University Computing Services


More information about the sakai-dev mailing list