fastly/fastly-js

`purgeSingleUrl` gives "malformed purge request" error

jimmyko opened this issue · 1 comments

Version

3.0.0

What happened

I followed the example and the function doesn't form the request correctly. Thecached_url is encoded by buildUrl() inside ApiClient.js.

This is how the URL is formed and sent by the API

https://api.fastly.com/purge/www.example.com%2Fpath%2Fto%2Fpurge

It supposed to be

https://api.fastly.com/purge/www.example.com/path/to/purge