本文介绍了为什么我在循环时收到错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
' the loop statement
do while messagessent < messages submitted
messagessent = messagesent + 1
Dim client = New RestClient("https://api.infobip.com/sms/1/text/multi")
foneno = trim(foneno.Replace(",",""","""))
Dim request = New RestRequest(Method.POST)
request.AddHeader("accept", "application/json")
request.AddHeader("content-type", "application/json")
request.AddHeader("authorization", "Basic NutrtryoYW5nZW1lMUE=") 'base64 of usename and password
request.AddParameter("application/json","{""messages"":[{""from"":""" + senderid + """,""to"":["""& mobileno &""" ],""text"":""" + message + """}]}",ParameterType.RequestBody)
Dim eresponse As IRestResponse = client.Execute(request)
loop
推荐答案
我不确定代码还有哪些其他问题,但从我在这里看到的情况来看,您有两个明显的错误.
I'm not sure what other issues the code has but from what i can see here you have two obvious errors.
- 循环条件语句使用变量
messages submit
我怀疑这是有效的. - 您正在处理一个变量
foneno
并在它下面的代码中使用不同的变量mobileno
.显然,这 2 个中的一个尚未声明.
- The loop conditional statement uses a variable
messages submitted
i doubt this is valid. - You are processing a variable
foneno
and using a different one in the code below itmobileno
. obviously one of these 2 haven't been declared.
这篇关于为什么我在循环时收到错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!