Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1502

To support Webhooks with all paths instead of only absolute path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • None

    Description

      Current Implementation supports Webhook URL with absolute path like https://www.hostname.com but it does not support urls like https://www.hostname.com/v1/api/webhook/ or https://www.hostname.com/webhook/

      Currently Webhook URLs working : Only AbsoluteUrls as baseURL (http://www.hostname.com/)
      URLs Not working : Relative Paths in baseURL like http://www.hostname.com/v1/api/webhook

      Root Cause : This problem is happening due to retrofit2 library as it removes relative path from baseURL due to "/" present in request like Get("/") , POST("/") etc. So it updates http://www.hostname.com/v1/api/webhook to http://www.hostname.com/ while making API call and hence we get 404 error.

      Please refer attached screenshots for same where i printed baseURL in logs, So baseURL was updated during api call and hence it is resulting in 404 error

      Resolution :
      So in order to support absolute url as well as all other relative URL Paths, I updated Webhook Service Code and replaced GET("/") by GET(".") So that retrofit2 library does not remove anything from baseURL. I tested code and it is working fine with both kind of URLs.

      Attachments

        Issue Links

          Activity

            People

              sandeepsoni911 Sandeep
              sandeepsoni911 Sandeep
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: