<commit_before>(ns clojars.cdn
  (:require [cheshire.core :as json]
            [clj-http.client :as http]))

(defn purge [key cdn-url path]
  (let [res (http/request {:method "PURGE"
                           :url (str cdn-url path)
                           :headers {"Fastly-Key" key}})
        body (json/parse-string (:body res) true)]
    (assoc body :http-status (:status res))))
<commit_msg>Properly format purge url<commit_after>(ns clojars.cdn
  (:require [cheshire.core :as json]
            [clj-http.client :as http]))

(defn purge [key cdn-url path]
  (let [res (http/request {:method "PURGE"
                           :url (format "%/%s" cdn-url path)
                           :headers {"Fastly-Key" key}})
        body (json/parse-string (:body res) true)]
    (assoc body :http-status (:status res))))

{'fraction_non_alphanumeric': 0.14927184466019416, 'fraction_numerical': 0.0, 'mean_word_length': 2.101503759398496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '725499', 'n_tokens_mistral': 277, 'n_tokens_neox': 263, 'n_words': 76}