The example shows a very basic server. Proper error handling should be implemented before being used in production environments.
How to run it:
- Open the example in VSCode (or any other IDE).
- Edit the
src/main/java/co/dapi/examples/springBoot/ExampleApplication.javafile to replace theappSecretvalue(YOUR_APPSECRET) with your Dapi application'sAppSecret. - Build the
Gradleproject. - Run the
ExampleApplicationclass. - The endpoint is now exposed on: http://localhost:9099/handleSDKRequest (by default).
- Use Postman (or any equivalent app), to POST valid Dapi requests to the endpoint
URL(mentioned above).- All requests' bodies should be in
JSONformat.
- All requests' bodies should be in