Sandeep created FINERACT-1502:
---------------------------------

             Summary: To support Webhooks with all paths instead of only 
absolute path
                 Key: FINERACT-1502
                 URL: https://issues.apache.org/jira/browse/FINERACT-1502
             Project: Apache Fineract
          Issue Type: Bug
            Reporter: Sandeep
         Attachments: WebhookAPICallUpdatesURL.png

Current Implementation supports Webhook URL with absolute path like 
[https://www.hostname.com|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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to