我有一个小问题,我刚刚从公共的Pastebin API更改为新的API。我收到无效的接口错误:接口请求错误,api_option无效
下面是我的代码:
Dim Exposure As Integer = 0
System.Net.ServicePointManager.Expect100Continue = False
If ComboBox1.Text = "Public" Then
Exposure = 0
Else
Exposure = 1
End If
Dim fi As String = "?api_paste_private=" & Exposure & "&api_paste_format=" & ComboBox2.Text & "&api_paste_expire_date=" & ComboBox3.Text & "&api_dev_key=CENSORED" & "&api_paste_code=" & code
Dim w As New System.Net.WebClient()
w.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim pd As Byte() = System.Text.Encoding.ASCII.GetBytes(fi)
Dim rd As Byte() = w.UploadData("http://pastebin.com/api/api_post.php", "POST", pd)
Dim r As String = System.Text.Encoding.ASCII.GetString(rd)
TextBox6.Text = r
Return r有谁能帮帮我吗?
发布于 2011-10-02 09:01:54
您必须向您的请求添加api_option=paste,如下所示:http://pastebin.com/api#2
https://stackoverflow.com/questions/7573193
复制相似问题