在使用cloudflare实现Web挂钩时,我不断收到以下错误消息。
与Trebble沟通时出错。
开发控制台说:
Sub Test_match_fill_data()
Dim aCell
Dim i, j As Long, keyrow As Long
Dim w1, w2 As Worksheet
Set w1 = Workbooks("Book1").Sheets("Sheet1")
Set w2 = Workbooks("Book2").Sheets("Sheet1")
i = w1.Cells(w1.Rows.Count, 1).End(xlUp).Row
j = w2.Cells(w2.Rows.Count, 1).End(xlUp).Row
For Each aCell In w1.Range("A2:A" & i)
On Error Resume Next
keyrow = w2.Columns("A:A").Find(What:=aCell, LookAt:=xlWhole).Row
On Error GoTo 0
If keyrow = 0 Then
w2.Range("A" & j + 1).Value = aCell
w2.Range("B" & j + 1).Value = aCell.Offset(0, 1).Value
j = j + 1
Else
w2.Range("B" & keyrow).Value = aCell.Offset(0, 1).Value
End If
keyrow = 0
Next
End Sub
答案 0 :(得分:0)
您需要检查来自该端点的响应是否是错误的JSON格式。您可以对API端点运行curl以模拟Cloudflare的Web挂钩。
您可以通过触发挂钩来获取JSON,然后在您的开发工具中查找类似
的URLcurl -vs "http://example.com/wordofday" --data {"event":"preview","install":{"id":"**","versionTag":null,"options":{},"schema":{"properties":{"location":{"title":"Message Location","description":"Where should the message appear?","order":0,"type":"object","format":"element","default":{"selector":"body","method":"prepend"}},"newopt_word":{"title":"Message","description":"A short example message.","type":"string","format":"richtext","order":1,"default":"<p>Welcome to Cloudflare Apps! This is our example app.</p><p>Download this app every time you want to make a new project.</p>"},"message":{"title":"Message","description":"A short example message.","type":"string","format":"richtext","order":1,"default":"<p>Welcome to Cloudflare Apps! This is our example app.</p><p>Download this app every time you want to make a new project.</p>"}}},"siteId":"preview","appId":"local","active":true,"metadata":{"userId":"**"}},"userId":"**"} -H "Accept:application/json, text/plain, */*" -H "content-type: application/json;charset=UTF-8"