Adblock breaks this site

HTTP Wrapper for VB.Net?

Discussion in 'Programming General' started by Bman :), Jul 16, 2009.

  1. Bman :)

    Bman :) Member

    Joined:
    Jul 8, 2009
    Posts:
    51
    Referrals:
    0
    Sythe Gold:
    0
    HTTP Wrapper for VB.Net?

    I was wondering if there was a httpwrapper for VB.net, because if there is, I May start programming in VB.net again :)
     
  2. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    HTTP Wrapper for VB.Net?

    Please elaborate on what you mean by HttpWrapper. I do find .Net perfectly capable of HTTP interoperability, so there is probably something along those lines even though I don't know what you're talking about.

    Take a look around the System.Net namespace on MSDN.
     
  3. Bman :)

    Bman :) Member

    Joined:
    Jul 8, 2009
    Posts:
    51
    Referrals:
    0
    Sythe Gold:
    0
    HTTP Wrapper for VB.Net?

    In visual basic 6, there was a module and user control in which let you post data and use certain functions of a webbrowser without having the actual webbrowser present.

    It is useful for making programs that you do not want to use alot of RAM and/or hard drive.

    It saves alot of time then going through the webbrowser functions and posting data that way, when you could just do something like this :

    strHTML = wrapper.postwrapper("http://www.google.ca/search?hl=en&q", text1.text & "&btnG=Google+Search&meta=&aq=f&oq=")


    That function would just go to google.ca, and post the data that was in textbox 1 to the search box on google.
     
  4. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    HTTP Wrapper for VB.Net?

    You could always write your own. The hardest part would be handling cookies...
     
  5. Bman :)

    Bman :) Member

    Joined:
    Jul 8, 2009
    Posts:
    51
    Referrals:
    0
    Sythe Gold:
    0
    HTTP Wrapper for VB.Net?

    I may be good at Visual basic, but, im not that good.
     
  6. hampe-92

    hampe-92 Forum Addict

    Joined:
    Jul 10, 2008
    Posts:
    328
    Referrals:
    0
    Sythe Gold:
    0
    HTTP Wrapper for VB.Net?

    something like this;
    (the cookie container isn't necessary in this case since google doesn't uses cookies for a simple search.. but you will need it if you have to authenticate e.g log somewhere... )

    pretty ugly but you get the idea and don't forget to close the streams etc when you are done...
     
  7. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    HTTP Wrapper for VB.Net?

    Google does use cookies for a simple search... D:
     
  8. hampe-92

    hampe-92 Forum Addict

    Joined:
    Jul 10, 2008
    Posts:
    328
    Referrals:
    0
    Sythe Gold:
    0
    HTTP Wrapper for VB.Net?

    oh really? never checked but w/e my mistake :p


    EDIT: I checked, and they maybe use cookies but they aren't necessary.. so you don't need the cookie container for a google search..
     
  9. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    HTTP Wrapper for VB.Net?

    Handling cookies is actually EXTREMELY easy.

    Use the HttpWebRequest (inherits from WebRequest) and HttpWebResponse (inherits from WebResponse) classes. You can then use what are called cookie containers. Basically you create and set the container, and all cookies will be stored in that container. You can then use that container to set the cookies for the next request, etc.

    Edit: Just so you know, HttpWebRequest and HttpWebResponse are the proper way you should send or receive information to/from the internet - WebClient is too basic and you can't really do much with it. WebRequest and WebResponse use data streams to/from the server, and they have full support for most (if not all) features of the Hyper-Text Transfer Protocol.
     
  10. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    HTTP Wrapper for VB.Net?

    Handling cookies from scratch is a bitch.... lol... Even from semi-scratch... >_>... And thats why I want to do it. Cuz its a bitch. lol.
     
  11. Blupig

    Blupig BEEF TOILET
    $5 USD Donor

    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant
    HTTP Wrapper for VB.Net?

    I'm pretty sure VB.net comes with a cookiehandler.
     
  12. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    HTTP Wrapper for VB.Net?

    Thatd be a bad waste of a good learning experience. D:
     
< ignroe please :P | grab processor name >


 
 
Adblock breaks this site