Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. const rp = require('request-promise')
  2.  
  3. let respuesta = []
  4.  
  5. array.forEach((item) => {
  6. let uri = `url/${item.param}`
  7.  
  8. rp({
  9. rejectUnauthorized: false,
  10. method: 'GET',
  11. uri: `${params.baseURI}${uri}`,
  12. json: true,
  13. headers: {...}
  14. }).then(res => {
  15. respuesta.push({
  16. ...
  17. })
  18. })
  19. })
  20. return resultado
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement