<commit_before>(ns metabase.http-client
  "HTTP client for making API calls against the Metabase API. For test/REPL purposes."
  (:require [clojure.data.json :as json]
            [clj-http.client :as client]
            [metabase.util :as u]))

(declare authenticate
         build-url
         client
         -client)

;; ## API CLIENT

(def ^:dynamic *url-prefix*
  "Prefix to automatically prepend to the URL of calls made with `client`."
  "http://localhost:3000/api/")

(defn
  ^{:arglists ([credentials-map? method expected-status-code? url http-body-map? & url-kwargs])}
  client
  "Perform an API call and return the response (for test purposes).<commit_msg>remove unneeded declare<commit_after>(ns metabase.http-client
  "HTTP client for making API calls against the Metabase API. For test/REPL purposes."
  (:require [clojure.data.json :as json]
            [clj-http.client :as client]
            [metabase.util :as u]))

(declare authenticate
         build-url
         -client)

;; ## API CLIENT

(def ^:dynamic *url-prefix*
  "Prefix to automatically prepend to the URL of calls made with `client`."
  "http://localhost:3000/api/")

(defn
  ^{:arglists ([credentials-map? method expected-status-code? url http-body-map? & url-kwargs])}
  client
  "Perform an API call and return the response (for test purposes).
{'fraction_non_alphanumeric': 0.12030075187969924, 'fraction_numerical': 0.006015037593984963, 'mean_word_length': 3.146417445482866, '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': '789498', 'n_tokens_mistral': 424, 'n_tokens_neox': 406, 'n_words': 136}