fix(api): treat headers properly