Skip to content

Tag: axios

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 for doing this image download is below (note that this is inside a class): I assume that the adapter for a stream response is the xhr one. Anyways, I ha…

How to pass data in body in get type Api in react.js?

I am trying to pass data in body of get type Api in react.js app. I am using the following code. But Api doesn’t get any data. Answer Adding on what @Jayna commented, you can’t send a body with a get request. You may do it on Postman and generate the axios code for it, but it won’t work due