Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brandon 4 posts 24 karma points
    May 27, 2011 @ 17:41
    Brandon
    0

    Getting Unsupported media type

    I have installed trhe uRest package but when doing a post to:

     http://mysite.com/rest/token?Username=name&Password=pass&Type=User

    I get HTTP/1.1 415 Unsupported Media Type.

     

    I also have the headers:

    Content-Type: application/json

    Accept: application/json

     

    Any suggestions??

  • Brandon 4 posts 24 karma points
    May 27, 2011 @ 17:43
    Brandon
    0
  • Matt Brailsford 4125 posts 22224 karma points MVP 9x c-trib
    May 27, 2011 @ 18:39
    Matt Brailsford
    0

    Hi Brandon,

    I think you may be using the method a little wrong. It looks like you are sending the values on the querystring as a GET request, when they must be submitted as a POST requested, formated as JSON. You can find details of the methods, and the Request / Result data formats here:

    http://urest4umb.codeplex.com/wikipage?title=Token&referringTitle=Documentation

    Cheers

    Matt

  • Brandon 4 posts 24 karma points
    May 27, 2011 @ 18:52
    Brandon
    0

    Matt,

    Could you give me a sample of what my URI should look like. I am using the rest-client at http://code.google.com/p/rest-client/ to test.

    I was sending a POST command to the URI i posted inmy first post.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies