Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- request({
- url: 'https://api.fetch-livraison.com/v1/users/login',
- method: "POST",
- json: connectionLogs
- }, (err, res) => {
- if (err) {
- console.error("Cannot login :", err)
- }
- let cookie = res.headers['set-cookie']
- request({
- url: 'https://api.fetch-livraison.com/v1/orders',
- method: "GET",
- header: {
- 'Cookie': cookie
- }
- }, (err,response) => {
- console.log(response.body) // one of the headers says user is not authorised
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement