Unable to Perform http post request

1
0
-1

Hi Community

I am trying to perform http post request using a bonita Application page. I am using custom Angular code , Not through any widget.
I am getting error 401. .Please help

$http.post('/bonita/API/bpm/process/6515950097857156604/instantiation', JSON.stringify(data)).then(function (response) {

I was able to get the Bonita X API token but i am not sure how to pass this along with POST request.

Could somebody provide a example.

Comments

Submitted by nagrjvv_2536654 on Sat, 11/13/2021 - 04:52

Try to send localhost prefix with the URL You used

1 answer

1
0
-1

Hi Roy,

Did you try to add them in your request header ? I recommend removing the/bonita prefix of your URL and use ../API instead, the server will handle the redirection.

You can find an example of how to use the $http service in the existing Button controller.

HTH
Romain

Notifications