1

Not sure how to do this, here is my code

 Dim oWeb As New System.Net.WebClient()

    oWeb.Headers.Add("Content-Type", "application/x-www-form-urlencoded")

    Dim bytArguments As Byte() = System.Text.Encoding.ASCII.GetBytes("username=username&password=password")
    Dim bytRetData As Byte() = oWeb.UploadData("https://www.website.com", "POST", bytArguments)
    MsgBox(oWeb.ResponseHeaders.GetValues(2))

Im attempting to get the cookies saved then use it for another post data i want to do, but I keep getting logged off in like 1 second.

The error is

Argument 'Prompt' cannot be converted to type 'String'.

for the message box

1 Answer 1

2

The problem is that the GetValues returns an array of strings, which the MessageBox has trouble displaying.

When I change the line to

MsgBox(String.Join(",", oWeb.ResponseHeaders.GetValues(2)))

It works, so you need to decide how you wish to concatenate the string array that is being returned.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.