POST/GET to website from inside VB.NET?

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

    POST/GET to website from inside VB.NET?

    I want to make a manual HTTP processor, but need to do GET/POST requests
    that could include post data such as button clicks or text fields... i know
    i read about this once before in straight .NET code, anyone have any
    articles on how to do this? I don't want anything visual, just to get the
    contents of the request back as text. thanks!


  • Smokey Grindle

    #2
    Re: POST/GET to website from inside VB.NET?

    Well I've worked with the web client and I am having problems posting form
    data to a page... I keep getting back 405 errors form the server... how do
    you post form data to the client and get a response? thanks!

    "Michel Posseth [MCP]" <MichelPossethM CP@discussions. microsoft.comwr ote in
    message news:FBD78322-87C6-412C-8EAF-FCFAB5289746@mi crosoft.com...
    Hello
    >
    >
    Do a google on the Webclient object and you wil find exactly what you
    need
    >
    "system.Net.Web Client "
    >
    >
    regards
    >
    Michel
    >
    "Smokey Grindle" wrote:
    >
    >I want to make a manual HTTP processor, but need to do GET/POST requests
    >that could include post data such as button clicks or text fields... i
    >know
    >i read about this once before in straight .NET code, anyone have any
    >articles on how to do this? I don't want anything visual, just to get the
    >contents of the request back as text. thanks!
    >>
    >>
    >>

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: POST/GET to website from inside VB.NET?

      "Smokey Grindle" <nospam@dontspa mme.comschrieb:
      >I want to make a manual HTTP processor, but need to do GET/POST requests
      >that could include post data such as button clicks or text fields... i know
      >i read about this once before in straight .NET code, anyone have any
      >articles on how to do this? I don't want anything visual, just to get the
      >contents of the request back as text.
      Check out the code samples on the page referenced below:

      <URL:http://dotnet.mvps.org/dotnet/code/net/#CookieRequest>

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

      Comment

      • Smokey Grindle

        #4
        Re: POST/GET to website from inside VB.NET?

        I forgot the "POST" command, now I feel dumb... works when its in place,
        thanks!

        "Michel Posseth [MCP]" <MichelPossethM CP@discussions. microsoft.comwr ote in
        message news:0D9F2ECF-5B4E-44A8-A4B4-4526E8D7A5E4@mi crosoft.com...
        Aha ,,,,
        >
        well i couldn`t get that information in your original post , thought you
        just needed to know how , not that you do know how but couldn`t get it to
        work .
        >
        Maybe it was / is a good idea to show what you have
        >
        >
        well this example might give you an idea
        >
        Dim oWc As New System.Net.WebC lient()
        Dim Vals As New
        System.Collecti ons.Specialized .NameValueColle ction()
        Vals.Add("bla1" , "value of 1")
        Vals.Add("bla2" , "value of 2")
        Dim byteBuffer As Byte()
        byteBuffer =
        oWc.UploadValue s("http://www.example.com/justaname.aspx" , "POST", Vals)
        Dim sBuffer As String=
        System.Text.Enc oding.Default.G etString(byteBu ffer)
        >
        >
        regards
        >
        Michel Posseth
        >
        >
        >
        >
        "Smokey Grindle" wrote:
        >
        >Well I've worked with the web client and I am having problems posting
        >form
        >data to a page... I keep getting back 405 errors form the server... how
        >do
        >you post form data to the client and get a response? thanks!
        >>
        >"Michel Posseth [MCP]" <MichelPossethM CP@discussions. microsoft.comwr ote
        >in
        >message news:FBD78322-87C6-412C-8EAF-FCFAB5289746@mi crosoft.com...
        Hello
        >
        >
        Do a google on the Webclient object and you wil find exactly what you
        need
        >
        "system.Net.Web Client "
        >
        >
        regards
        >
        Michel
        >
        "Smokey Grindle" wrote:
        >
        >I want to make a manual HTTP processor, but need to do GET/POST
        >requests
        >that could include post data such as button clicks or text fields... i
        >know
        >i read about this once before in straight .NET code, anyone have any
        >articles on how to do this? I don't want anything visual, just to get
        >the
        >contents of the request back as text. thanks!
        >>
        >>
        >>
        >>
        >>
        >>

        Comment

        Working...