skip to Main Content

ReactJs API returns undefined

I was building a react application and I used the following code to get data from an API. import './App.css'; import {useEffect, useState} from 'react'; function App() { const [records, setRecords] = useState([]); useEffect(()=>{ getData(); }, []); const getData =…

VIEW QUESTION

Json – Connecting to an API and parsing the data

import requests import json def jprint(obj): text = json.dumps(obj, sort_keys=True, indent=4) if name == "main": response = requests.get("https://anapioficeandfire.com/api/characters/583") jprint(response.json()) data_list = response.json() my_dictionary = data_list[0] tvSeries = int(input("What series do you want to search?")) final_dictionary = {} for elem in…

VIEW QUESTION

How to send http request in flutter

session.post( 'http://myopencart.example.com/index.php?route=api/cart/add', params={'api_token':'768ef1810185cd6562478f61d2'}, data={ 'product_id':'100' 'quantuty':'1' } ) How to I post this in flutter. In this api there is two type of data to be posted. I need solution for this I didn't tried yet.

VIEW QUESTION

Can't update user on the server but works on localhost using Laravel

I'm working on an api and a lot of it works great, but for some reason I cannot update the members. This is the route: Route::prefix('member')->group(function () { Route::post('login', [AppHttpControllersApiMemberAuthController::class, 'login']); Route::post('register', [AppHttpControllersApiMemberAuthController::class, 'register']); Route::middleware('auth:member_api', 'member.auth.api')->group(function () { Route::get('/', [AppHttpControllersApiMemberAuthController::class,…

VIEW QUESTION
Back To Top
Search