Skip to content

Commit f0861f2

Browse files
authored
fix: specify dob as form data for getStudentCode (#46)
1 parent 86afa2a commit f0861f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/studentClient.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ export class StudentClient extends BaseClient {
111111
): Promise<GetStudentCodeResponse> {
112112
const data = await this.makeAuthedRequest(`${this.API_BASE}/getcode`, {
113113
method: "POST",
114-
body: JSON.stringify({
115-
date: options.dateOfBirth,
116-
}),
114+
body: `date=${options.dateOfBirth}`,
115+
headers: {
116+
"content-type": "application/x-www-form-urlencoded",
117+
},
117118
});
118119
return data;
119120
}

0 commit comments

Comments
 (0)