thisandagain / fastly

Fastly API client for Node.js
MIT License
70 stars 28 forks source link

Soft Purge Key is not soft purging #44

Open ETNOL opened 4 years ago

ETNOL commented 4 years ago

I'm finding soft purge key to perform hard purges. If I'm following the execution path correctly, I then fastly-soft-purge: 1 value is being passed as form data rather than a header param. Passing it as a header appears to perform a soft purge correctly when testing locally.

Below is where I think the soft-purge value is being lost: https://github.com/thisandagain/fastly/blob/9cdc03a76d393d79a9d888091e4e5b09efe94d84/lib/index.js#L39

I found merging the param values with the default headers and omitting form data solves it.