You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have trouble doing this as I am very new to react and react native. I am trying to use axios to fetch record from API. I have attached the POSTMAN screenshot. The first issue I have is the grant_type in the body of the postman and second is how to change the username and password to accept the inputs from the user.
`componentDidMount(){
const data={
grant_type: 'password',
client_id:'RxPadApp',
username: this.state.username,
password: this.state.password,
}
axios.post('http://192.168.210.159:3000/api/2019/token',
data
)
.then((response)=>{
console.log(response);
}).catch((error)=>{
console.log(error);
});
}
`
The text was updated successfully, but these errors were encountered:
I have trouble doing this as I am very new to react and react native. I am trying to use axios to fetch record from API. I have attached the POSTMAN screenshot. The first issue I have is the grant_type in the body of the postman and second is how to change the username and password to accept the inputs from the user.
`componentDidMount(){
const data={
grant_type: 'password',
client_id:'RxPadApp',
username: this.state.username,
password: this.state.password,
`
The text was updated successfully, but these errors were encountered: