質問編集履歴

1

scriptを追記しました

2020/09/18 15:31

投稿

tktail
tktail

スコア72

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ```
8
8
 
9
- {"id":"000001","createdAt":"2020-09-01","updatedAt":"2020-09-01","publishedAt":"2020-09-01","title":"Hello World","content":"First Contents","image":{"url":"https://test.jpg"},"category":["cate01"]
9
+ {"id":"000001","createdAt":"2020-09-01","updatedAt":"2020-09-01","publishedAt":"2020-09-01","title":"Hello World","content":"First Contents","image":{"url":"https://test.jpg"},"category":["cate01"]}
10
10
 
11
11
  ```
12
12
 
@@ -26,4 +26,30 @@
26
26
 
27
27
 
28
28
 
29
+ ちなみにscriptは以下のようになっています。
30
+
31
+ ```
32
+
33
+ async asyncData() {
34
+
35
+ const { data } = await axios.get(
36
+
37
+ 'https://sample.com',
38
+
39
+ {
40
+
41
+ headers: { 'X-API-KEY': '###' }
42
+
43
+ }
44
+
45
+ )
46
+
47
+ return data
48
+
49
+ }
50
+
51
+ ```
52
+
53
+
54
+
29
55
  解決方法をご存じの方、いらっしゃいましたらよろしくお願い致します。