omarryhan/aiogoogle

How to redirect queries to another server?

Closed this issue · 4 comments

kovan commented

Hi. I have a server running on localhost (json-caching-proxy) that caches queries to the Google APIs, This way I can test my code against that server without worrying about quota usages.

How can I point this library to that server? Or what would you recommend for testing without directly using Google servers?

Hey again, not sure I understand exactly what you need help with. Do you maybe need to change the the base URL of the API calls and point it at your proxy instead so that your proxy handles the request? Is there a hard requirement for this caching proxy server? Maybe you can just cache in-memory using a decorator?

kovan commented

Do you maybe need to change the the base URL of the API calls and point it at your proxy instead so that your proxy handles the request?

Yes, exactly that.
I am using the caching proxy to test my code against the API without worrying about quotas.

I'll go ahead and close this issue now. Please reopen it if you have further question.