HELP with RESTful write APIs...

 
    • Radio-MD schrieb...
    • Benutzer
    • 9. Nov. 2009, 5:42

    HELP with RESTful write APIs...

    i am having problems with my REST-based write (POST) API calls.

    the only documentation page i can find on the proper way of performing these POST-based calls is here: http://www.last.fm/api/rest

    however, this page does not provide a sample 'REST Request.' rather, it only shows a sample 'REST Response.' this is unusual for web service documentation.

    can someone provide me with what the REST-based POST body should actually look like? should the body just be the URL as if it were a GET? this doesnt seem to work for me. also, i have tried to POST with a body in the XML-RPC format, but that is not working either.

    the API call that i am testing with and cannot get working is radio.tune.

    also, are there any examples of the last.fm APIs being called from .NET (e.g. C#, VB.NET, etc)?

    thanks in advance for your help.

    Radio MD Service
  • In a REST POST request (not just one for Last.fm), the post body is what would be the query string of the corresponding GET request. So for example, if my GET request would be:

    http://example.com/ws/?param1=blah&param2=garbleThen the body of the corresponding POST request (POSTed to http://example.com/ws/) would be:

    param1=blah&param2=garbleDon't forget you'll also have to URL-encode any strings that need to go along with the request.


Anonyme Benutzer dürfen keine Beiträge schreiben. Bitte log dich ein oder registriere dich, um Beiträge in den Foren schreiben zu können.