wah.moe/spec/support/api_client.cr

13 lines
241 B
Crystal
Raw Normal View History

2024-09-13 11:58:12 +00:00
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