aboutsummaryrefslogtreecommitdiff
path: root/spec/support/api_client.cr
blob: 46d449a88637770b13d623ba54359f06cb7331a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class ApiClient < Lucky::BaseHTTPClient
  app AppServer.new

  def initialize
    super
    headers("Content-Type": "application/json")
  end

  def self.auth(user : User)
    new.headers("Authorization": UserToken.generate(user))
  end
end