Caching API calls, replace Guzzle with other client

41 views
Skip to first unread message

Tac Tacelosky

unread,
Jan 2, 2025, 6:39:59 AMJan 2
to Guardian Open Platform API Forum
I'm working on a Symfony bundle that wraps this API library.   I need to intercept the URL before it's sent to guzzle and see if it's already in the cache.   I also want to use Symfony's HttpCache rather than Guzzle.

So I want to make my call instead of calling the base class ->makeApiCall(), but to do that I need to build the URL, and buildUrl() is marked as protected.  I was simply going to duplicate buildUrl in my service, but it depends on baseUrl, which is also protected.  

Any suggestions?

Tac
Reply all
Reply to author
Forward
0 new messages