[Implemented] Native HTTP Library

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
nblackburn
User
User
Posts: 67
Joined: Mon Aug 19, 2013 1:22 am
Location: United Kingdom
Contact:

[Implemented] Native HTTP Library

Post by nblackburn »

Something I would really like to see is a fleshed out native HTTP library which allows you to send requests such as GET, POST, add headers to a request (similar to something like cURL) and return the content from the request back to the application which would normally be a lot of work (from what I can see).

Code: Select all

HttpRequest("GET", "http://google.com", #parameters, #headers)
Image
User avatar
ostapas
Enthusiast
Enthusiast
Posts: 192
Joined: Thu Feb 18, 2010 11:10 pm

Re: Native HTTP Library

Post by ostapas »

You reminded me about a John Lennon song("You, you may say
I'm a dreamer, but I'm not the only one") :) This feature request is popping up perhaps every 2 weeks.
User avatar
nblackburn
User
User
Posts: 67
Joined: Mon Aug 19, 2013 1:22 am
Location: United Kingdom
Contact:

Re: Native HTTP Library

Post by nblackburn »

That means it's in demand, hopefully the developers will see :)

I am actually stumped why this wasn't really thought out being added as it seems such a fundamental and widely used thing not to include.
Image
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: Native HTTP Library

Post by PMV »

Just search the forum for a include file ...
Or do it completely yourself. It is not that hard,
maybe chunked-encoding, but you will learn a lot
about HTTP. So, it is already possible :wink:

There are many more thinks the developers can
do and thats why they haven't spend more time
on the HTTP-Lib. :lol:

Happy Coding. :wink:

MFG PMV
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: Native HTTP Library

Post by Olby »

Just use the libcurl.dll directly. I pretty sure the header files for PB are flying somewhere around the forums as we speak.
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Native HTTP Library

Post by RichAlgeni »

I would tend to agree with PMV & Olby. You can learn so much more by getting into the nut and bolts of a process, than by just asking for a new feature.

Get yourself a good socket sniffer, like from nirsoft.net, go to his network tools. Watch how a number of web pages are sent, then create your own dll. Customize it to exactly how you need it. You'll get exactly what you need, and be proud of the accomplishment!
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: Native HTTP Library

Post by USCode »

RichAlgeni wrote:... Get yourself a good socket sniffer, like from nirsoft.net, go to his network tools. ...
Hi Rich, How does the NirSoft sniffer compare to Microsoft's Network Monitor? Have you tried it?
http://www.microsoft.com/en-us/download ... px?id=4865
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Native HTTP Library

Post by RichAlgeni »

I haven't used the latest version from Microsoft, but I will make it a goal to do so.

The socket sniffer from Nir Sofer is great! You can select the application you want to sniff! Rather than having to sort through a ton of extraneous data.
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: Native HTTP Library

Post by Justin »

IE 10 has an excellent built in tool for this, it only shows the browser traffic.
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: Native HTTP Library

Post by said »

+1 for native http lib
Post Reply