Request http headers

This commit is contained in:
Kristian Polso 2018-06-08 14:00:55 +03:00
parent 4e55527adb
commit 66da437148

View file

@ -112,12 +112,14 @@ app.post('/upload-image', textParser, function(req, res) {
request({ request({
method: "PUT", method: "PUT",
url: "http://daemon.lbry.tech/images.php", url: "http://daemon.lbry.tech/images.php",
headers: {
'Content-Type': 'text/plain'
},
qs: { qs: {
access_token: process.env.LBRY_DAEMON_ACCESS_TOKEN access_token: process.env.LBRY_DAEMON_ACCESS_TOKEN
}, },
body: req.body, body: req.body,
}, function(error, response, body) { }, function(error, response, body) {
console.log(body);
body = JSON.parse(body); body = JSON.parse(body);
res.json(body); res.json(body);
}); });