Discussion:
[fpc-pascal] fphttpclient.post
Ched
2018-10-31 22:43:01 UTC
Permalink
Hello All,

I'm using fphttpclient.simpleget to make querries to webserver. It's very very simple to use this
function ! "Du pur bonheur".

As some data which travel the world encoded in clear in the url of the get are sometime private
(connecting password for example), I'd like to use the post method which crypts the data when using https.

There is a fphttpclient.simplepost method with various possibilities for the call, but it dosen't accept
something like fphttpclient.simplepost(the-url, an-ansistring). It would also be very nice to have a
function which returns also the result in an ansistring as fphttpclient.simplepost(myurl) do.

Yes, you guessed right: I'm not a specialist of networking in Freepascal and I don't understand why one
have to manage TStrings and streams as the data of the request are probably very simple to build in an
ansistring.

Bad- or good idea ? And how difficult would it be to build ?

Cheers, Ched'
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-
Sven Barth via fpc-pascal
2018-10-31 22:51:24 UTC
Permalink
Post by Ched
Hello All,
I'm using fphttpclient.simpleget to make querries to webserver. It's very
very simple to use this
function ! "Du pur bonheur".
As some data which travel the world encoded in clear in the url of the get
are sometime private
(connecting password for example), I'd like to use the post method which
crypts the data when using https.
Your assumption is incorrect. The only part that is "transmitted"
unencrypted is the host, because that one is resolved using DNS. The
remaining URL is the first line of the already encrypted HTTP header.

Regards,
Sven
Ched
2018-11-01 21:22:59 UTC
Permalink
Hello All,

Thank you, Sven and Wkitty42, for having corrected a false assumption about encryption of url.

Nevertheless, why not to have a simplepost(an-url, an-ansistring)::ansistring method available ?

Cheers, Ched'
Post by Ched
Hello All,
I'm using fphttpclient.simpleget to make querries to webserver. It's very very simple to use this
function ! "Du pur bonheur".
As some data which travel the world encoded in clear in the url of the get are sometime private
(connecting password for example), I'd like to use the post method which crypts the data when using
https.
Your assumption is incorrect. The only part that is "transmitted" unencrypted is the host, because that
one is resolved using DNS. The remaining URL is the first line of the already encrypted HTTP header.
Regards,
Sven
As some data which travel the world encoded in clear in the url of the get are sometime private (connecting password for example), I'd like to use the post method which crypts the data when using https.
ummm... if you are using https, GETs are ""crypted"" as are the other http request methods HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE and PATCH...
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin
Michael Van Canneyt
2018-11-01 22:14:17 UTC
Permalink
Post by Ched
Hello All,
Thank you, Sven and Wkitty42, for having corrected a false assumption about
encryption of url.
Nevertheless, why not to have a simplepost(an-url, an-ansistring)::ansistring
method available ?
What should this do ? What does the ansistring contain ? What is the
encoding ?

Michael.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://

w***@windstream.net
2018-11-01 11:27:22 UTC
Permalink
Post by Ched
As some data which travel the world encoded in clear in the url of the get are
sometime private (connecting password for example), I'd like to use the post
method which crypts the data when using https.
ummm... if you are using https, GETs are ""crypted"" as are the other http
request methods HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE and PATCH...
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list unless*
*a signed and pre-paid contract is in effect with us.*
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman
Loading...