Questions tagged as 'fetch'

2
answers

Make a GET request with fetch

Hello recently I am learning to use fetch I found on the internet an api which offers me a random user service now I have been trying to make a simple request where I only return a JSON that contains female users, and from a specific country lik...
asked by 06.10.2018 / 04:41
1
answer

Compare two values of a property of different json

I need to compare the value of a property from 2 different jsons to be able to show something on the screen. For example : 1st json: { registros: [ { "paciente": 2, "problema": { "nota": "Mano derec...
asked by 11.09.2018 / 03:28
2
answers

res.json is not a function

This is my endpoint router.post("/users/github/:code", function(req, res) { var state; fetch('https://github.com/login/oauth/access_token/', { method: 'POST', headers: { Accept: 'application/json', 'Content-...
asked by 22.03.2017 / 21:17
1
answer

Collect in an object the responses received from 3 URLs via fetch

Good I am trying to compile in an array the objects that I get from the calls fetch () at 3 url. let log = console.log; let datafile1 = fetch('http://s3.amazonaws.com/logtrust-static/test/test/data1.json'); let datafile2 = fetch('http://s3.ama...
asked by 19.09.2018 / 17:07
1
answer

Differences between FETCH ABSOLUTE and FETCH RELATIVE

I am working with cursors whose behavioral parameter is SCROLL but I do not understand what is the objective of two of its functions when it comes to making the FETCH . I do not understand what they do or what they serve FETCH AB...
asked by 14.06.2018 / 12:47
1
answer

Unexpected token N in JSON at position 0

Guys I have an error that in my NodeJS rest API, and can not resolve this. My idea is to do a github login, this application works like this: Redirection to github by returning a temporary code in callback. Send this temporary code to m...
asked by 27.01.2017 / 18:37
0
answers

Download and analyze spreadsheet spreadsheet with javascript

I need to download a spreadsheet made with spreadsheets like csv and be able to use the information with javascript. I have this code: function fetchCSV () { let src = "https://docs.google.com/spreadsheets/d/e/GZ5l45JT9VV-y/pub?gid=1670264290...
asked by 22.10.2018 / 06:21
2
answers

Store values in Array from fetch

let arrayDatos = []; arrayDatos = fetch('url') .then(response => response.json()) .then(posts => return posts) I'm trying to fill an array with data that returns the fetch function, but asynchronous Javascript I can not fill it. U...
asked by 09.04.2018 / 21:52
1
answer

Using variables outside the Fetch

I'm using the following Fetch: var bdresultados; if(respuesta.context.bueno){ fetch('/bd/').then(response =>{ return response.json(); }).then(data => { for(let indice of data){ bdresultados = ind...
asked by 19.12.2018 / 01:08
1
answer

doubt with the result of a fix

I have a question about the result of an arrangement that I believe in an iteration and I do not know why the code is the following: This piece of code is an object which I will use to dynamically manage a direction that I will bring with the fu...
asked by 22.11.2018 / 23:36