gofr icon indicating copy to clipboard operation
gofr copied to clipboard

Option for API-RATE-LIMITER for interservice http request

Open aryanmehrotra opened this issue 11 months ago • 2 comments

Is your feature request related to a problem? Please describe. When connecting to an external service for example: zoho - they have a limit on how many request should be sent per min or per sec etc. Which the user would need to implement separately i.e a queue.

Describe the solution you'd like Similar to default headers, basic auth etc we should have an option to queue the api calls based on the setting defined.

Describe alternatives you've considered Alternatively I will write the code myself to rate limit outgoing calls

Additional context Usage would be something like:

app.AddHTTPService("zoho", app.Config.Get("ZOHO_HOST"),  
&gofrSvc.APIRateLimit(10, time.Duration(1)*time.Second))

Reference : https://www.zoho.com/billing/api/v1/introduction/#api-call-limit

aryanmehrotra avatar Jan 22 '25 07:01 aryanmehrotra

@Umang01-hash can you please assign this issue to me

vaidehiadhi avatar Jan 22 '25 10:01 vaidehiadhi

Sure @vaidehiadhi done.

Umang01-hash avatar Jan 22 '25 10:01 Umang01-hash

Closing this issue as a similar issue has been picked up under GoFr Summer of Code.

coolwednesday avatar Jul 07 '25 09:07 coolwednesday