1

I have configured cloudinary in my @service class as "TestUploadService" to upload image for background removal.

Sample Code:

cloudinary.api().update("woman", 
  ObjectUtils.asMap(
    "background_removal", "cloudinary_ai",
    "notification_url", "https://dev:8080/cloudinary/status" ));

I need to write new rest endpoint as mentioned in notification_url. How to hit this endpoint in a separate rest service?

dwayneJohn
  • 919
  • 1
  • 12
  • 30
  • This answer here provides an example of a Spring Boot controller that accepts a JSON and parses it: https://stackoverflow.com/a/43112322/21062 – Igy Jul 19 '19 at 12:00
  • @Igy Should I process this URL via rest template using postForObject? – dwayneJohn Jul 19 '19 at 12:40
  • @Igy the endpoint gets a "Whitelabel error message". This application has no explicit mapping for /error, so you are seeing this as a fallback. Mon Jul 22 06:59:15 UTC 2019 There was an unexpected error (type=Not Found, status=404). No message available – dwayneJohn Jul 22 '19 at 07:00
  • That implies you're calling a URL which isn't mapped to the controller, and also that you don't have a controller mapped to `/error` which handles errors – Igy Jul 22 '19 at 08:40
  • @Igy I can able to access the endpoint but now the error shows, Required request body is missing: 400 Bad Request – dwayneJohn Jul 23 '19 at 06:40
  • 1
    And are you sending a request body, or are you saying that Cloudinary didn't send one? I've checked Cloudinary's notifications recently and body should contain a JSON string – Igy Jul 23 '19 at 14:54

0 Answers0