2012-04-11 5 views
0

Als Antwort auf meine Anfrage für ein Autorisierungs-Token antwortet Soundcloud mit einer JSON-Zeichenfolge, obwohl ich nach xml frage. Ist das ein Fehler oder ist er nicht implementiert oder mache ich etwas falsch?Soundcloud antwortet mit json anstelle von xml wie angefordert

Ich habe die Ausgabe von libcurl in "verbose" -Modus unten, die "Accept" -Kopfzeile, sowie die zurückgegebene Zeichenfolge im JSON-Format angezeigt.

> POST /oauth2/token HTTP/1.1 
User-Agent: libcurl-agent/1.0 
Host: api.soundcloud.com 
Accept: application/xml 
Content-Length: 641 
Content-Type: multipart/form-data; boundary=----------------------------6d7e62ba13e0 

< HTTP/1.1 200 OK 
< Server: nginx 
< Date: Tue, 10 Apr 2012 21:48:55 GMT 
< Content-Type: application/json; charset=utf-8 
< Connection: keep-alive 
< X-Runtime: 44 
< ETag: "62f76a251f0cdc7c41edec20560d2c04" 
< Cache-Control: private, max-age=0, must-revalidate 
< Access-Control-Allow-Methods: GET, PUT, POST, DELETE 
< Access-Control-Allow-Headers: Accept, Authorization, Content-Type, Origin 
< Access-Control-Allow-Origin: * 
< X-Cacheable: NO:Cache-Control=max-age=0 
< Content-Length: 133 
< X-Varnish: 3363129842 
< Age: 0 
< Via: 1.1 varnish 
< X-Cache: MISS 
< 
* Connection #0 to host api.soundcloud.com left intact 

Soundcloud Ergebnis: { "access_token": "1-17690-10631-cea7e4319d85f1XXXX", "expires_in": 21599, "Umfang": "*", "refresh_token": "50530eb4738f285df48f3694ad49XXXX"}

Antwort

0

Vielen Dank, dass Sie darauf hingewiesen haben. Im Moment wird JSON vom OAuth2-Token-Endpunkt unterstützt, der nicht mit dem Rest der API übereinstimmt. Ich werde einen Fehler einreichen und hoffentlich können wir das beheben. Du machst aber nichts falsch :-)

+0

OK .. Ich habe es mit json arbeiten, so dass es in Ordnung ist – user1313170

Verwandte Themen