I'm facing an issue with sending data to my server. Currently, I am working on a project using react native and axios version ^0.16.2.
let input = {
'longitude': -6.3922782,
'latitude': 106.8268856,
'content': 'uget - uget sampai kaki lemes',
'pictures': []
}
axios({
method: 'POST',
url,
headers: {
'Content-Type': 'application/json',
'Authorization': this.state.headers.authorization
},
data: input
})
.then((resultAxios) => {
console.log('hasil axios', resultAxios)
})
However, the status result consistently shows error 500.
When I try to send data using Postman, everything works perfectly fine. In Postman, I configure it as follows:
headers: {
Authorization: ''',
Content-Type: application/json
}
body = raw, JSON
Does anyone have any suggestions on how to resolve this issue? Thank you :)