HTTP Request/Response - Best Approach in BlitzMax?

BlitzMax Forums/BlitzMax Programming/HTTP Request/Response - Best Approach in BlitzMax?

Murilo(Posted 2010) [#1]
I'm about to write an OS X app that will use Google's API over HTTP. I'd normally write something like this in C#, as it's the language I use daily, but I'd like to get back to using BlitzMax for smaller projects (it's been a while). So...

What's the best way to post requests and process responses over HTTP with BlitzMax?

I basically need to issue a load of information in the header, send a file, and process the result. It's something I do regularly in C#, but I'm a little lost here. I'm hoping to open source the results, so I want to make sure it's the most "elegant" solution possible.

Thanks for any help/tips.


Brucey(Posted 2010) [#2]
Personally, I would use libcurl.

Of course, some people will suggest you "roll your own" :-)


Murilo(Posted 2010) [#3]
Thanks Brucey. Funnily enough, I've just installed your libcurl module. It looks to be perfect for my needs!

I can't get the docs to show up in the main BlitzMax documents at the moment. I'm not sure what I'm doing wrong. After a rebuild of the docs, the MaxGUI stuff is showing up, but not the bah.mod stuff. I can see that the html and bbdoc files have been generated in the doc sub folders. Hmmm...


Brucey(Posted 2010) [#4]
It should be in the "3rd party" modules section of the Help.


Murilo(Posted 2010) [#5]
Hmmm... I don't appear to have that section:

Audio
Miscellaneous
Streams
BASIC
Graphics
Events
System
Networking
User input
Data structures
Math
MaxGUI Drivers
MaxGUI
Other (just contains pub.lua)


Murilo(Posted 2010) [#6]
Ah. I've found it - Thanks.

It doesn't appear in the main help, but it does appear in the list on the right hand side.


Htbaa(Posted 2010) [#7]
I've used bah.libcurlssl to write htbaapub.rest. Which although the name suggests is for REST only, it doesn't have to be. Might be of interest to you.