Questions tagged as 'axios'

1
answer

Error Defining Headers-Authorization on the return of data in Axios

I'm trying to set the headers - Authorization after a request via axios, this request returns the token that is generated on the server, in line 7 of the code below assign the token that is returned to insert in the headers in Authorization and...
asked by 25.09.2018 / 18:37
1
answer

axios basic auth - how to pass user and password to api?

I was looking at the axios documentation and saw that to pass the user and password it is necessary to use: auth: { username: 'janedoe', password: 's00pers3cret' }, I applied the same in my reactjs code: axios.get(store.urlBase + 'api...
asked by 20.08.2018 / 15:40
1
answer

How to send a post request using Axios and Asp.net Core Web API?

I am making a request with axios with the verb post , but I can not. Note > With the verb get I can make the request. Object cliente: { nomeCompleto: '', cpf: '', email: '', endereco: { cep:...
asked by 05.07.2018 / 13:32
1
answer

How to use async / await in get request using vue + axios?

I have the following code and would like to know how I can implement a try / catch with async / await executing the same function: import Vue from 'vue' import axios from 'axios' new Vue({ el: '#app', data: { skills: [], }, mounte...
asked by 20.05.2018 / 19:08
2
answers

React Native - Pass data to another component

I'm having a question, I'm starting with react native and I'm building an app that contains some components and uses react-navigation. The question is: From this component that renders several items, when I click I want to receive this data i...
asked by 05.02.2018 / 22:28
1
answer

How to make the project Laravel see the axios file?

Before I was having trouble making the project see the file as you can see in this post: I need make my Javascript file see the vue and axios files He was like this: Andnowit'slikethis,ithasbeenfixed: Thechangewastoputthefileaxiosand...
asked by 01.11.2017 / 11:08
1
answer

Convert response data from HTML to PDF

My response.data is returned a ticket in HTML format, I want to convert it to PDF. How do I? Below a part of the code: imprimirboleto: function () { axios({ method: 'get', url: '/server/boleto', params: {...
asked by 09.08.2017 / 21:39
1
answer

Download using the axios?

I'm using Axios to make the requests of my application, and in one of the GET requests returns a PDF file. When I make the GET request by Postman it opens a window to choose where to save the file, but when I make the request for my application...
asked by 04.08.2017 / 15:07
0
answers

Problems with axes, Spring Boot and base64

I'm trying to make a post from my react native app for my Spring boot application. However, I'm getting this error:    java.lang.IllegalArgumentException: Illegal base64 character a React Native Code: axios({ method: 'post', url...
asked by 20.12.2018 / 12:22
1
answer

Request with Axios and React blocked by CORS policy

I'm trying to make the request for an API, using Axios: axios.post('http://api.teste.com.br/v1/getToken', { withCredentials: true, auth: { username: 'usuario', password: 'password' }, headers: {...
asked by 12.12.2018 / 13:57