I have a client application (Smart TV) in HTML/JS which retrieve data using an API, the data from the Server is in JSON format.
Using JSON I have troubles in Cross-origin resource sharing (CORS), so I need to get the data in JSONP, unfortunately the current API does not provide JSONP.
My questions:
01 - Could I use Node.js to create a sort of HTTP Proxy, to be used only on the Client so I can query the API in JSON and output the result to JSONP format?
02 - Node.js would work on Firefox and WebKit?
I think what you're looking for is a reverse proxy which will proxy calls from your html client to the remote API on a different domain.
If you do this then you don't need JSONP, JSONP allows you to do cross domain calls, but with the disadvantage that the remote API has to return JSONP, not all do.
Have a look here:
nginx as proxy for api calls: http://www.gabrielweinberg.com/blog/2011/07/nginx-json-hacks.html
node as a proxy for api calls: https://github.com/nodejitsu/node-http-proxy