Hello
I`m trying to use scriptrunner to reset cache in cloudflare.
I have api key, zone id, login in customfields in issue.
customfields : api, zone, login
def http = new HTTPBuilder('https://api.cloudflare.com/client/v4/zones/$zone/purge_cache')
http.request(POST) {
requestContentType = ContentType.JSON
body = [{"purge_everything":true}]
response.success = { resp, JSON ->
return JSON
}
How to add headers and what libs should I import?