I'm totally stuck here. I need to post data to an API with bearer authentification.
I am using the request module in node.js . The request documentation only describes the get method. But I need a "POST".
request.get('http://some.server.com/', {
'auth': {
'bearer': 'bearerToken'
}
});
Something like this (which of course is not working, otherwise I wouldn't post this question):
request.post('http://some.server.com/', {
'auth': {
'timeout': 1000,
'bearer': 'bearerToken',
'body': '{SomeSerializedJSON}'
}
});
Any clues?