VB Post暴力

时间:2015-08-05 12:04:38

标签: vb.net

我总是收到错误,这是我的代码。它试图强制使用“confirmID”。

Imports System
Imports System.Text

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        For i = 1 To NumericUpDown2.Value
            Using sendto As New Net.WebClient
                Dim param As New Specialized.NameValueCollection
                param.Add("displayedUserID", "72961169")
                param.Add("invitationID", NumericUpDown1.Value + i)
                param.Add("view", "FriendRequests")
                param.Add("targetUserID", "1")
                param.Add("pageNum", "1")
                Dim response_bytes = sendto.UploadValues("http://www.roblox.com/friends/acceptfriendrequest", "POST", param)
                Dim response_body = (New Text.UTF8Encoding).GetString(response_bytes)
                Label1.Text = i
            End Using
        Next
    End Sub
End Class

1 个答案:

答案 0 :(得分:0)

您尝试POST的网站正在提供HTTP 500错误。问题不在于您的代码,而在于外部网站。