We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ea6f6a commit 5d4afcbCopy full SHA for 5d4afcb
src/lib/api/index.ts
@@ -30,15 +30,19 @@ const handleResponse = async (response: Response): Promise<any> => {
30
31
export const get = async (path: string) =>
32
fetch(new URL(path, BASE_URL).toString(), {
33
- redirect: 'follow'
+ headers: {
34
+ 'User-Agent': 'github-actions',
35
+ },
36
+ redirect: 'follow',
37
}).then(handleResponse);
38
39
export const post = async (path: string, body: any) =>
40
41
method: 'POST',
- redirect: 'follow',
42
+ body: JSON.stringify(body),
43
headers: {
44
45
'Content-Type': 'application/json'
46
},
- body: JSON.stringify(body)
47
48
0 commit comments