質問編集履歴
3
URLが間違っていました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -104,7 +104,7 @@
|
|
104
104
|
|
105
105
|
```JSコンソール
|
106
106
|
Response {type: "cors", url: "http://0.0.0.0:8000", redirected: false, status: 200, ok: true, …}
|
107
|
-
body:(...)
bodyUsed:false
headers:Headers {}
ok:true
redirected:false
status:200
statusText:"OK"
type:"cors"
url:"http://0.0.0.0:8000
|
107
|
+
body:(...)
bodyUsed:false
headers:Headers {}
ok:true
redirected:false
status:200
statusText:"OK"
type:"cors"
url:"http://0.0.0.0:8000"
__proto__:Response
|
108
108
|
```
|
109
109
|
|
110
110
|
問題として、Javascript側でのfetch成功時にresの中身を出力してみるのですが、bodyの中身がカラになってしまい、JSON取得が失敗となってしまいます。
|
2
URLが間違っていました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -103,7 +103,7 @@
|
|
103
103
|
```
|
104
104
|
|
105
105
|
```JSコンソール
|
106
|
-
Response {type: "cors", url: "http://0.0.0.0:8000
|
106
|
+
Response {type: "cors", url: "http://0.0.0.0:8000", redirected: false, status: 200, ok: true, …}
|
107
107
|
body:(...)
bodyUsed:false
headers:Headers {}
ok:true
redirected:false
status:200
statusText:"OK"
type:"cors"
url:"http://0.0.0.0:8000/business_term/search/"
__proto__:Response
|
108
108
|
```
|
109
109
|
|
1
コンソールコードを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -102,6 +102,10 @@
|
|
102
102
|
}
|
103
103
|
```
|
104
104
|
|
105
|
+
```JSコンソール
|
106
|
+
Response {type: "cors", url: "http://0.0.0.0:8000/business_term/search/", redirected: false, status: 200, ok: true, …}
|
107
|
+
body:(...)
bodyUsed:false
headers:Headers {}
ok:true
redirected:false
status:200
statusText:"OK"
type:"cors"
url:"http://0.0.0.0:8000/business_term/search/"
__proto__:Response
|
108
|
+
```
|
105
109
|
|
106
110
|
問題として、Javascript側でのfetch成功時にresの中身を出力してみるのですが、bodyの中身がカラになってしまい、JSON取得が失敗となってしまいます。
|
107
111
|
|