I need to send data to an API that (for some weird reason) expects this {'user_uid: '22222'}, literally.
Im trying to do it with jQuery like this:
$.ajax({
type: 'POST',
url: 'https://api.com/api/',
'user_id': '2222'
success: function(result) {
console.log(result);
if(result.error){
}else{
}
},
error: function(xhr, ajaxOptions, thrownError) {
console.log(xhr.status);
console.log(thrownError);
},
});
And with AngularJS:
$http.post('https://api.com/api', {'user_id': '2222'})
.success(function(data) {
}
Weird thing, if I try to do it in Postman, I need to use 'raw' query and enter: {'user_id': '22222'}
But if I use form-data it fails
Can some point me in the right direction?
Thanks in advance.
'user_id': '2222'<-- invalid statement