Page 1 of 1

Features for the HTTP library

Posted: Tue Apr 29, 2008 5:18 pm
by Joakim Christiansen
Since I've created all these myself I don't really need them, but it would be handy for newbies:

GetHeaderValue("Content-Length") ;Extracts the value
SetUserAgent("Whatever you want to call it") ;Then used by ALL PB functions accessing the internet
HTTPPost(URL$,PostData$,@RecievingBuffer,BufferLength) ;Where post data is like value=blabla&value2=blabla

EDIT:

I would also like URLEncoder() to have a flag to encode single and double quotes.

Posted: Tue Apr 29, 2008 5:56 pm
by AND51
You know the Image-Button? :wink:

Go and add your ideas here:
http://www.purebasic.fr/english/viewtopic.php?t=30680 :idea:

Posted: Tue Apr 29, 2008 6:18 pm
by Hroudtwolf
Hi Joakim Christiansen,

Good ideas.
But your definition of HTTPPost isn't very handy.
Postdatas could containing binary data like attachements.

I commend such like this....

AddHTTPPostData ( *Attachment , lAttachmentSize.l )
AddHTTPPostString ( sKey.s , sString.s )
SendHTTPPost( sURL.s , *receivingBuffer , lBufferSize.l )

Best regards

Wolf

Posted: Tue Apr 29, 2008 6:50 pm
by Joakim Christiansen
I would also like URLEncoder() to have a flag to encode single and double quotes too.