next page url does not have the .js format appended
i am requesting a jsonp response from the storageroom api by
appending the .js format to the request url. i also send a per_page
parameter with the request . the problem i am having is that the
next_page_url field in the response does not has the the .js format
appended, and hence when i set it in my 'load next' request i get a
bad request. my question is, is there a way to tell the api that
the next_page_url should have the .js format appended when the
initial one also had it?
thanks a lot in advance
macs
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Sascha on 31 May, 2012 09:29 AM
Hi Marcus,
the API currently always removes the format extension (.js, .json) as it is really only a workaround and actually HTTP headers should be used for content type negotiation.
There's no way to add ".js" to all the URLs in a response right now. We're rethinking some of this and might add it in the future. In the meantime you could just use a regular expression to rewrite the URL yourself.
Regards,
Sascha
Sascha closed this discussion on 31 May, 2012 09:29 AM.