You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
Hi, thanks for the answer
I've tried in such a way:
var https = require('https'); var options = { host: 'openapi.etsy.com', path: '/v2/shops', headers: {'user-agent': 'Mozilla/5.0'}}; https.get(options, function(res) { console.log("Got response: " + res.statusCode); console.log(res.headers);}).on('error', function(e) {console.log("Got error: " + e.message);});
For this request, I got a response from Apache server 200 and see 'content-type': 'application/json', but don't know how to read it(it's the next step).
But with 'http' I receive the response as before even with using Agent in request
What happens if you try that same code from Node.js on the desktop?
You could try setting 'User Agent' in the headers? It's possible that Etsy blocks anything that it isn't sure is a web browser