fphttpclient.post

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

fphttpclient.post

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.

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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fphttpclient.post

Free Pascal - General mailing list
Ched <[hidden email]> schrieb am Mi., 31. Okt. 2018, 23:43:
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 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fphttpclient.post

wkitty42
In reply to this post by Ched
On 10/31/18 6:43 PM, Ched wrote:
> 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fphttpclient.post

Ched
In reply to this post by Free Pascal - General mailing list
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'




Le 31.10.2018 à 22:51, Sven Barth via fpc-pascal a écrit :

> Ched <[hidden email] <mailto:[hidden email]>>
> schrieb am Mi., 31. Okt. 2018, 23:43:
>
>     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

> On 10/31/18 6:43 PM, Ched wrote:
>> 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fphttpclient.post

Michael Van Canneyt


On Thu, 1 Nov 2018, Ched wrote:

> 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal