Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ContentType for DSDataFormat.JSON

    Hi,

    I'm using a RestDataSource with the following OperationBinding:

    Code:
    OperationBinding updateOpBinding = new OperationBinding();
    updateOpBinding.setDataFormat(DSDataFormat.JSON);
    updateOpBinding.setOperationType(DSOperationType.UPDATE);
    updateOpBinding.setDataProtocol(DSProtocol.POSTMESSAGE);
    When receiving it on the server, the post message is as expected (json), but I was a little surprised to see the result of req.getContentType() was "text/xml; charset=UTF-8".

    Shouldn't the content type be "application/json; charset=UTF-8"?

    Since this doesn't change the data in any way, it's not a big deal, but just thought I'd ask. :)

    Forgot to mention I'm using smartgwt-2.0.
    Last edited by adiloret; 24 Feb 2010, 19:16.

    #2
    Quite right, fixed and will appear in SVN in a few days.

    Comment

    Working...
    X