質問編集履歴
3
コード内容の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
以下のようにaxiosのget実行時にhttpsのAPIを叩いているのにhttpで呼び出されてしまい、以下のエラーが出ます
|
3
3
|
|
4
4
|
```typescript
|
5
|
-
const apiUrl = "https://hogehoge.com/api
|
5
|
+
const apiUrl = "https://hogehoge.com/api"
|
6
6
|
axios.get(apiUrl, {
|
7
7
|
params:{
|
8
8
|
device_number: deviceNumber //deviceNumberはuseStateで管理している値
|
2
コードに説明を追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
const apiUrl = "https://hogehoge.com/api?device_number=0"
|
6
6
|
axios.get(apiUrl, {
|
7
7
|
params:{
|
8
|
-
device_number: deviceNumber
|
8
|
+
device_number: deviceNumber //deviceNumberはuseStateで管理している値
|
9
9
|
}
|
10
10
|
}).then((response)=>{
|
11
11
|
console.log(response.data)
|
1
記事のリンクを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,5 +18,6 @@
|
|
18
18
|
|
19
19
|
###試したこと
|
20
20
|
調べたところ以下のような記事があったため試してみましたが、解決には至りませんでした。
|
21
|
+
https://qiita.com/ProjectEuropa/items/db71aa5658333abf967f
|
21
22
|
解決方法等ご存知の方いらっしゃいましたら教えていただきたいです。
|
22
23
|
よろしくお願いいたします。
|