Questions tagged as 'fetch'

0
answers

Fetch api, Retrieve response data

I have a code in javascript that sends an id by POST, to a php file (vs 7.2.9) that consults with sql to a DB, and I need the html code it generates to make a report with dompdf Javascript code let cedu = snapshot.val().cedula;...
asked by 05.11.2018 / 22:59
1
answer

How can I call the event of an element that I am declaring in a function in javascript?

I am a bit stuck with this code and I can not find the solution, what I want to do is that when loading the sun the "loadWithParameter" function is called and generates elements from javascript and loads data from a rest api. At the end you also...
asked by 22.10.2018 / 02:32
0
answers

Fetch access-control-allow-origin

I'm calling an API with a fetch, when I make the call I get the following:    Failed to load link : Response to preflight request does not pass access control check: No 'Access-Control-Allow- Origin 'header is present on the requested resour...
asked by 09.10.2018 / 04:04
0
answers

Reference error when saving objects in an array

I'm trying to insert objects into an array. The objects I want to insert come from another object that I get by making an asynchronous call using fetch (). let log = console.log; let apiRequest1 = fetch('http://s3.amazonaws.com/logtrust-s...
asked by 21.09.2018 / 16:07
0
answers

HTTP CODE 304 WHEN CONSUMING A SERVICE WITH FETCH

I have a api rest that works perfectly with postman, but when I consume it in the client with a fetch, it returns a code 304 NOTE: This happens to me when I send the token in the headers, if I do not send the token everything works normal   ...
asked by 12.09.2018 / 07:03
0
answers

I would like to extract the sucess and error that this javascript answers me, how is it done?

$(document).ready(function(){ $('#idBoton').click( function(){ var order_val =$('#verificacion').val(); var order_name = $('#name').val(); var order_cedula = $('#cedula').val(); v...
asked by 30.07.2018 / 23:50
0
answers

How can I get the name of a json with fetch () in React

I would like to destructurize a json to get the name, email and address of the api, but only print the json on the console, does not work correctly <p>{props.nombre}</p> , what is my error or how can I get those v...
asked by 05.05.2018 / 06:27
1
answer

How to capture object File sent with fetch in a Symfony Driver

I have the following code where you asicronically sent an object file .. This is the function with which I capture the File object handleChangeAudio: (event) => { var arrayAudio = event.target.files; function readerF...
asked by 04.12.2017 / 15:47
1
answer

Service consumption problem from react-native with form-data using fetch and axios

I am programming in react-native an app that consumes services, when the service is consumed with POSTMAN if it works when sending the header and body, however when I try to consume with fetch and react-native axios it returns me status 406 no n...
asked by 18.08.2018 / 04:45