I encountered a case where the json response from "add url" is invalid
(the parser we use is picky). My request looks like this (except for
the apikey):
---
POST /1.1/resources/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host:
api.contextvoice.com
Content-Length: 143
format=json&apikey=abc123&url=http%3A%2F%2Fdi.se%2FAvdelningar
%2FArtikel.aspx%3FO%3DRSS%26ArticleId%3D2009%5C08%5C26%5C349880
---
I get this response from your API:
---
HTTP/1.1 302 Found
X-Lighty-Magnet-Uri-Path: /1.1/resources/
X-Mashery-Responder:
proxyworker-i-e42da68d.mashery.com
Content-Type: application/json
Server: lighttpd/1.4.19
Location: 1.0/resources.json/?url=
http://di.se/Avdelningar/
Artikel.aspx?O=RSS&ArticleId=2009\08\26\349880
Date: Thu, 27 Aug 2009 09:03:28 GMT
Accept-Ranges: bytes
Content-Length: 150
{ "info": { "message": "Resource found.", "url": "1.0/resources.json/?
url=
http://di.se/Avdelningar/Artikel.aspx?
O=RSS&ArticleId=2009\08\26\349880" } }
---
I believe that the problem is the "\" in the URL. In our request, the
URL is properly encoded, but none of the URLs we've gotten back have
had URL-encoded query string values, so I suspect this could be a
problem with other characters as well.