Closed OriaLogic closed 7 months ago
Ok I was able to make it work by doing
await cf.zones.purgeCache(site.cloudflareZoneId, '{ "files": ["http://example.com/salut.jpg"] }');
Another better way :
await this.cf.zones.purgeCache(
this.site.cloudflareZoneId,
JSON.stringify({ files: imageUrls })
);
but how come I need to turn the parameters into a string in order to make it work ? I must be missing something here...
Hi,
I have a bug when trying to purge cache for a list of files.
First I test the endpoint with curl :
I do the exact same thing with the library and I get :
I dug into the library to follow the request and log a few things. The parameters for the http call are the following :
I don't understand what is going on here. To me the request is correct, everything seems fine and yet my call does not work
Am I missing something ?
Thanks for the help, Lucas