Request never executes in node.js -


i'm struggling senseless problem: made request in node.js never executes. tried writing in every way, tried other api tools postman work , give me code use nothing work. console doesn't log anything, no errors, no responses, nothing.

this (one of thousands versions made of):

var options = {     method: 'post',     url: 'https://onfleet.com/api/v2/tasks',     headers: {         'cache-control': 'no-cache',         authorization: 'basic secret-code-auth-string'     },     body: '{"merchant":"bno7g*q58ojqljtg25wntgyn","executor":"bno7g*q58ojqljtg25wntgyn","destination":"vrxou2hy~7ipqh*kcwtizito","recipients":["xbfxqmyvioxt3ufctq4tsbh3"],"pickuptask":"false","notes":"mega informazioni per chi consegna, lista prodotti e indirizzo di consegna","autoassign":{"mode":"load","team":"hvnbkgabb*hj9uvxi6ndoz6f"}}' };  console.log(options);  request(options, function (error, response, body) {     if (error) throw new error(error);      console.log(body); }); 

everything simple - use request 20 times in rest of code i'm going crazy! thank you


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -