Posting data to a url

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Posting data to a url

    Hi

    How can I post data to a url and get the status code back in vb.net? In the
    past I have used the below code in vba whose vb.net equivalent I am looking
    for.

    Set oHttpPost = CreateObject("M icrosoft.XMLHTT P")
    oHttpPost.Open "POST", MyUrl, False
    oHttpPost.setRe questHeader "Content-Type",
    "applicatio n/x-www-form-urlencoded"
    POSTData = "Some data here"
    oHttpPost.Send (POSTData)
    If oHttpPost.statu s = 200 Then
    St = oHttpPost.respo nseText
    End If

    Thanks

    Regards


Working...