我正在尝试集成批量 SMS API。遵循他们的示例代码后,我得到了Compiler Error Message: BC30002: Type 'RestClient' is not defined.
代码如下
<%@ Page Language="VB" Debug = "true" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Import Namespace="System.Data.SqlClient"%>
<%@ Import Namespace="System.net.mail"%>
<%@ Import Namespace="System.Data"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Net.http" %>
<%@ Import Namespace="System.text" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="microsoft.http" %>
<%@ Import namespace="System.Web.Script.Serialization" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="Restclient" %>
<SCRIPT language="vb" runat="server">
Sub Page_load(S as Object,E as EventArgs)
Dim client = New RestClient("https://api.infobip.com/sms/1/text/single")
' Dim byt As Byte() = System.Text.Encoding.UTF8.GetBytes(strOriginal)
'
' ' convert the byte array to a Base64 string
'
' strModified = Convert.ToBase64String(byt)
Dim request = New RestRequest(Method.POST)
request.AddHeader("accept", "application/json")
request.AddHeader("content-type", "application/json")
request.AddHeader("authorization", "Basic ctrtre2hvbGFkcm0xOmNoYW5nZW1lMUE=")'base64 of usename and password
request.AddParameter("application/json", "{""from"":""SMS"", ""to"":[ ""4356653443"",""2348056355307""],""text"":""Test SMS.""}", ParameterType.RequestBody)
Dim response As IRestResponse = client.Execute(request)
response.Write(response)
end sub
</SCRIPT>
请帮我。