When I type a city name into my search bar it should pull up information on the weather on that city but I get a 400 bad request error JAVASCRIPT: Answer You are using a promise incorrectly. The correct syntax is .then(result => {}).catch(e => {}) Like this
Tag: api
syntax error only on first load, after refresh page then will be gone
I got this error: “Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0” whenever I clear browsing data and refresh page to load my API, but it only shows in the first load, then will be gone after refresh again. looks it beacuse of cookies or somethings, is there anybody can help me out? Thanks for any
TypeError: Cannot read property ‘map’ of undefined when I am trying to access API call data
I am trying to make a movie search app with React and have made an API call to The Movie Database API. I have this form and what I am trying to do is get the data of the movie that I am searching for. I am not able to access the data from the API call, and I get
HTML Drag & drop api not working when dropping elements (React)
I have a web page where words need to be rearranged by drag and drop method. The app is built with React. My issue is that when the element is dropped in the drop zone/area, the id that was set by the target element is blank. This was the original error TypeError: Failed to execute ‘appendChild’ on ‘Node’: parameter 1
convert datetime to string using AJAX
Guys I would like to ask for your help I have here a Get Method using AJAX I successfully get the date from database this is the output 2020-08-13T00:00:00 however I wanted to convert the date format to this 2020-08-13 how can I convert the the datetime? below is my code /Get/ $(document).ready(function () { }) Thank you for your
Read file on Discord from Dropbox location using JavaScript
I’m currently working on getting a Discord bot to connect to a directory inside of Dropbox, I’m using Discord.js and the Dropbox JavaScript SDK and I’ve done the following: And I get the following response data: But I’m unsure of how to proceed with this data, do I need to convert the content hash back to a json file? Or
Generate dynamic KML and load it with Maps API
Hi all i have task to create monitoring of 200 ip addresses and for each of this ip we have location latitude/longitude. Now for the monitoring purpose i have perl script runing which pings all 200hosts and update their status in MySql database. Now i want to display these 200 locations on google maps and change marker color depending on
API resolved without sending a response for /api/users/create, this may result in stalled requests. NEXTJS
I created an API endpoint to handle user account creation in my Next.js app, and I am using knex.js to handle my queries, but I still get this error: My code in /pages/api/users/create.js: Answer actually the bcrypt hash function is an async function, it returns a promise to be either resolved with the encrypted data salt or rejected with an
API called twice while useEffect triggered once. ReactJS/Javascript
i am building a project, in which when user click the buyNow button in Basket (child 2) it will pass the props back to parent where it further pass it to another child in Signin(child 3) where we call an API call(inside useEffect) to update the mysql database but it seems that the API call is called twice as in
How to set the value of a background Image in Vue using a URL generated by an API
I am trying to set the value of the background image of my #app element in Vue to the response that is generated from Unsplash’s API. I am able to retrieve the image URL, but I am having some difficulty in trying to relay that information to the background style element. Overall, my goal is to use a random image