HTTP POST and custom headers for HTTP request

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
purenet
User
User
Posts: 30
Joined: Wed Oct 21, 2009 10:11 am

HTTP POST and custom headers for HTTP request

Post by purenet »

Hello,

HTTP POST request and custom headers for HTTP request (REST) are useful features.

Currenly I don't see way to send data to the server using SSL HTTP POST. Parameter GET request is
possible if need only get information from the server but it's not suitable to transfer big amount of data
to the server.
Without SSL it's possible to code own HTTP requests using socket library but it's not secure
and therefore can't use it in production enviroment.

Nowadays REST is essential to transfer data between different systems.
TroaX
New User
New User
Posts: 5
Joined: Thu Nov 12, 2015 9:36 pm

Re: HTTP POST and custom headers for HTTP request

Post by TroaX »

+1

Couchbase
CouchDB
Node.js REST-Services
OAuth

and many many many more!
Sorry for my bad english :D
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: HTTP POST and custom headers for HTTP request

Post by vwidmer »

+1

Would be great for accessing lots of API stuff.

Thanks
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
SergeyA
New User
New User
Posts: 8
Joined: Sun Jan 20, 2013 9:09 am

Re: HTTP POST and custom headers for HTTP request

Post by SergeyA »

+1
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: HTTP POST and custom headers for HTTP request

Post by the.weavster »

+1
User avatar
SparrowhawkMMU
User
User
Posts: 44
Joined: Fri Jan 17, 2014 8:55 pm
Location: UK

Re: HTTP POST and custom headers for HTTP request

Post by SparrowhawkMMU »

+1

For true REST we also need PUT, PATCH and DELETE HTTP verbs/methods.
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 621
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: HTTP POST and custom headers for HTTP request

Post by tj1010 »

+1

It's about that time of a year for another HTTP POST request. You can tell nobody uses HTTP though cause nobody has noticed buffer limits enforced by all webservers on GET.. I believe I posted the last POST request.
The truth hurts.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: HTTP POST and custom headers for HTTP request

Post by infratec »

purenet wrote:Without SSL it's possible to code own HTTP requests using socket library but it's not secure
and therefore can't use it in production enviroment.
If you can code this with the socket library, you can also code it with ssl and the 'inbuild' libcurl.

Examples are available.

But it's right, the networking part of the community waits already a long time for improvements.
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 621
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: HTTP POST and custom headers for HTTP request

Post by tj1010 »

infratec wrote:
purenet wrote:Without SSL it's possible to code own HTTP requests using socket library but it's not secure
and therefore can't use it in production enviroment.
If you can code this with the socket library, you can also code it with ssl and the 'inbuild' libcurl.

Examples are available.

But it's right, the networking part of the community waits already a long time for improvements.
cURL doesn't have any CA management, so if your CA file is out of date anyone with the key set for a revoked CA can hack your software with DNS attacks. Mozilla is the only one with a managed CA file and it's poorly maintained.. Most people don't even update to that one..

But yeah POST has been requested at least a few times a year since I've been here. Even SpiderBASIC has it and it was wrote years later from scratch.. A poor workaround is terminal cURL on Debian and OSX and SendRequest on Windows..
The truth hurts.
danilocoelho
New User
New User
Posts: 9
Joined: Sun Mar 04, 2018 3:39 pm
Location: Cianorte, PR - Brazil

Re: HTTP POST and custom headers for HTTP request

Post by danilocoelho »

SparrowhawkMMU wrote:+1

For true REST we also need PUT, PATCH and DELETE HTTP verbs/methods.
+1
Post Reply