Unable to do POST request using a MID server for SAP integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 06:27 AM
I am unable to do a POST request using MID server and BASIC auth credentials.
Rest Message:
HTTP Method:
Now there is a BR that will create the record on m2m outboud(
Once this has created the record there will be another BR triggered to call the POST request and send the payload.
screenshot of BR:
But i am getting "failure" response for any/all the updates triggering this POST request
Can someone please help as to why that is happening. Also in the past it was working fine. We have checked the credentials, MID server connectivity to the port on endpoint. Everything is correct. but why am i getting failure as response every time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 09:22 AM
In your BR - from where comes the variable UniqueHostnames ? Same question for the variables/properties in your loop when you itearte trough UniqueHostname.
Also, can you show the BR setup here - you should be using async BR in general for your use case.
Avoid using new JSONPArser() - use JSON.parse(obj) instead , like you did few lines above it.
Also, not a good practice to name your variables starting with capital letter - avoid it - for example :
var TransactionStatus = "" - rename it to var transactionStatus or var transaction_status - I prefer the first one as it's more readable and snake_case variables are usually used for GlideRecords - much easier to distinguish what is what in the code.