in basemodel use Header cant get token but in function its ok why?
class Test(BaseModel):
name: str
token: str= Header(None)
def login(t: Test):
print(t.dict())
return 'test'
output {'name': '123', 'token': None}
if i do this is ok
def login(t: Test,token: str= Header(None)):
print(t.dict(),token)
return 'test'
output {'name': '123', 'token': None} 123456
who can help me plz !