Hi
I'm developing an anonymous web service based on this tutorial:
https://academy.creatio.com/documents/technic-sdk/7-16/creating-anonymo…
I want to get the full raw request body inside a POST method.
Is there any way to do it since it's not supported in WCF?
Or can I create a web service based on .NET Web API instead of WCF Rest API?
Thank you
Mohamed
Like
Hi Mohamed,
Could you please specify your business target and which task should it solve? Please provide a bit more detailed information on your task and its purpose. Look forward to hearing from you!
Regards,
Anastasiia
Anastasiia Markina,
I'm building an endpoint to receive Webhook notifications.
In order to verify the sender identity, I should validate the message signature with HMAC-SHA256 secret key.
To do that, I should get the full request body and create a digest then compare it with the signature.
Thank you
Mohamed
Mohamed,
Can you please also specify if you are going to create a web-service through the internal system resources like a custom package or you want to use outside .NET environment and connect such a web-service to your Creatio platform?
Regards,
Anastasiia
Anastasiia Markina,
I'm creating a creatio configuration service that will use ESQ to read/add data.
Hope that explains the situation.
Thank you
Mohamed
Mohamed,
Thank you for the clarification.
To receive the original POST request, you need to inherit your web-service from the base class BaseService and get the request through the BaseService.IHttpContextAccessor.GetInstance().Request.
However, please note that this is not the original method but the Creatio's system wrapper. You can find the example in the configuration section, "EsnService" module, ESN package.
Regards,
Anastasiia
Anastasiia Markina,
Hi Anastasiia, this reply seems to be outdated now as the EsnService module doesn't contain any usages similar to that. Could you advise what the current methodology would be for getting the data from a POST request in Creatio C# code would be please? The documentation on custom web services in Creatio doesn't have much to go on.
Hello,
We have documentation detailing the correct data that needs to be entered: Documentation Link
Perhaps this will assist you.