Initial commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
const http = require('http');
|
||||
|
||||
const options = {
|
||||
hostname: 'localhost',
|
||||
port: 8080,
|
||||
path: '/v1/orders/history',
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': 'Bearer test',
|
||||
'X-Actor-Id': 'act_admin'
|
||||
}
|
||||
};
|
||||
|
||||
const req = http.request(options, res => {
|
||||
console.log(`statusCode: ${res.statusCode}`);
|
||||
let data = '';
|
||||
res.on('data', d => {
|
||||
data += d;
|
||||
});
|
||||
res.on('end', () => {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
req.end();
|
||||
Reference in New Issue
Block a user