Category "axios"

Upload single image from axios to FastAPI: "Expected UploadFile, received: <class 'str'>"

I try to upload an image from my react-admin app to FastAPI using axios. The ImageInput component returns a File object which I cast to a Blob and try to upload

how to remove WebKitFormBoundary from uploaded file

I'm trying to upload a Webvvt file using multipart/form-data, and the problem is that when I send the file to api, the file contain WebKitFormBoundary header an

How to mock axios.create([config]) function to return its instance methods instead of overriding them with mock?

I'm trying to mock axios.create() because I'm using its instance across the app and obviously need all of its implementation which is destroyed by the mock, thu

This error happened while generating the page. Any console logs will be displayed in the terminal window

1st time its show this error I want to make an API call to my API route using Axios. When I run my code the first time its shows that error but when I refresh

Cannot find module 'axios'

I am coding a small program for Firebase Functions, using node.js. I always install my node modules using npm and i also installed axios using npm only. Howe

Cannot read property 'Authorization' of undefined with Nuxt Auth & Axios

I have been using nuxt/auth-next and axios modules with nuxt project since last 3-4 months, everything was working fine since yesterday but now whenever I try t

ReactJS API call - Need redirect URL in response from request with 30X status without redirecting

I have an API which returns 30X response and redirects to a specific URL. But, I want to get redirect URL from response without redirection. I am using this in

Unable to authenticate (okta) a post request to a route from within a route getting a 401 Unauthorized response. GET Request works

I have a nodejs app utilising express using @okta/okta-sdk-nodejs and @okta/oidc-middleware to handle authentication. I have a number of routes that work fine a

Reading Cookie from React (backend with FastAPI + fastapi-jwt-auth)

I am having some problems with understanding JWT in Cookie using Axios and FastAPI. I am trying to make a simple application with React for the frontend and Fas

React - get data with axios

In my react app that is based on class components, My response API got from open weather fixes after several lags. this is my state class Weather extends Compon

How to use delete request with axios in react project and Firebase?

I need to delete the element but don't know how to get that specific element! This is the structure of data on Firebase And this is the code: import React, {us

How to POST correctly a form that have data and files with VueJS, Axios and Laravel?

I am posting here as a beginner of VueJS and Laravel. I am stuck with a problem that I can't fix by myself after hours of search. I would like to know how corre

Axios error: ... .data.pipe is not a function

So I am basically trying to use axios to download a image from a url, but I get this error: TypeError: streamResponse.data.pipe is not a function My function fo

text() method not available in Blob

I am doing some Integration tests with jest & nock to test Axios interceptors chaining. In one of them, I am expecting to receive a Blob instance and accord

Error: The type cast expression is expected to be wrapped with parenthesis when using get function

im new to javascript and im trying to make a get request to a youtube API. I have preconfigured a few things related to the request before making it using axios

Sending json through api post request

I'm currently struggling to send a JSON via post request into my controller to use it further by calling a stored procedure. Here is the post request using axio

Getting 400 bad request in Axios but in Postman status 200

I'm trying to request a Power BI API using axios. var configReportInfos = { method: 'get', url: `https://api.powerbi.com/v1.0/myorg/groups/${process.env

NuxtJS Auth Proxy

Then using nuxtjs/auth and nuxtjs/axios nuxt is ignoring my proxy configuration. In past I have used just axios for auth. Now I am trying to use the @nuxtjs/aut

How to mock VueAxios in jest

I want to test my Api functions which are on separate file outside vue component. Inside this methods i call api by Vue.axios, and i can't find the way to mock

Can't retrieve data from POST in django view

I have issue with retrieving data from POST in my django view. I send React form values with axios to my django backend. I believe data gets put into POST but s