Showing
6 changed files
with
12 additions
and
6 deletions
... | @@ -24,7 +24,8 @@ const MealCard = (props) => { | ... | @@ -24,7 +24,8 @@ const MealCard = (props) => { |
24 | method: 'GET', | 24 | method: 'GET', |
25 | headers: { | 25 | headers: { |
26 | 'Content-Type': 'application/json', | 26 | 'Content-Type': 'application/json', |
27 | - 'authorization': user | 27 | + 'authorization': user, |
28 | + 'Accept': 'application/json' | ||
28 | } | 29 | } |
29 | }).then(response => response.json()) | 30 | }).then(response => response.json()) |
30 | .then(result => { | 31 | .then(result => { | ... | ... |
... | @@ -34,7 +34,8 @@ const MealCard = (props) => { | ... | @@ -34,7 +34,8 @@ const MealCard = (props) => { |
34 | method: 'POST', | 34 | method: 'POST', |
35 | headers: { | 35 | headers: { |
36 | 'Content-Type': 'application/json', | 36 | 'Content-Type': 'application/json', |
37 | - 'authorization': user | 37 | + 'authorization': user, |
38 | + 'Accept': 'application/json' | ||
38 | }, | 39 | }, |
39 | body: JSON.stringify({ | 40 | body: JSON.stringify({ |
40 | "cardid":props.id | 41 | "cardid":props.id | ... | ... |
... | @@ -13,7 +13,8 @@ const UserCards = (props) => { | ... | @@ -13,7 +13,8 @@ const UserCards = (props) => { |
13 | method: 'GET', | 13 | method: 'GET', |
14 | headers: { | 14 | headers: { |
15 | 'Content-Type': 'application/json', | 15 | 'Content-Type': 'application/json', |
16 | - 'authorization': user | 16 | + 'authorization': user, |
17 | + 'Accept': 'application/json' | ||
17 | 18 | ||
18 | } | 19 | } |
19 | }).then(response => response.json()) | 20 | }).then(response => response.json()) | ... | ... |
... | @@ -13,7 +13,8 @@ const MypickPage = () => { | ... | @@ -13,7 +13,8 @@ const MypickPage = () => { |
13 | method: 'GET', | 13 | method: 'GET', |
14 | headers: { | 14 | headers: { |
15 | 'Content-Type': 'application/json', | 15 | 'Content-Type': 'application/json', |
16 | - 'authorization': user | 16 | + 'authorization': user, |
17 | + 'Accept': 'application/json' | ||
17 | 18 | ||
18 | } | 19 | } |
19 | }).then(response => response.json()) | 20 | }).then(response => response.json()) | ... | ... |
... | @@ -12,7 +12,8 @@ const SigninPage = (props) => { | ... | @@ -12,7 +12,8 @@ const SigninPage = (props) => { |
12 | return fetch('/api/signin', { | 12 | return fetch('/api/signin', { |
13 | method: 'POST', | 13 | method: 'POST', |
14 | headers: { | 14 | headers: { |
15 | - 'Content-Type': 'application/json' | 15 | + 'Content-Type': 'application/json', |
16 | + 'Accept': 'application/json' | ||
16 | 17 | ||
17 | }, | 18 | }, |
18 | body: JSON.stringify(user), | 19 | body: JSON.stringify(user), | ... | ... |
... | @@ -29,7 +29,8 @@ const SigninPage = (props) => { | ... | @@ -29,7 +29,8 @@ const SigninPage = (props) => { |
29 | method: "POST", | 29 | method: "POST", |
30 | body: JSON.stringify(signupInfo), | 30 | body: JSON.stringify(signupInfo), |
31 | headers: { | 31 | headers: { |
32 | - "Content-Type": "application/json" | 32 | + "Content-Type": "application/json", |
33 | + 'Accept': 'application/json' | ||
33 | 34 | ||
34 | } | 35 | } |
35 | }; | 36 | }; | ... | ... |
-
Please register or login to post a comment