System.Net.HttpWebRequest equivalent

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

    System.Net.HttpWebRequest equivalent

    Hi

    What is the System.Net.Http WebRequest equivalent code for the MS XML related
    code below?

    Thanks

    Regards


    Set oHttpPost = CreateObject("M icrosoft.XMLHTT P")
    oHttpPost.Open "POST", "www.MyUrl.com" , False
    oHttpPost.setRe questHeader "Content-Type",
    "applicatio n/x-www-form-urlencoded"

    POSTData = "<data here>"

    oHttpPost.Send (POSTData)

    If (oHttpPost.stat us >= 200 And oHttpPost.statu s < 300) Then
    St = oHttpPost.respo nseText
    End If


Working...