Last active
March 28, 2019 07:00
-
-
Save adnan360/a5d4ef7a3182ac29b50bb971dc81d235 to your computer and use it in GitHub Desktop.
Send post data and show response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
..., fphttpclient; | |
procedure TForm1.Button1Click(Sender: TObject); | |
begin | |
With TFPHttpClient.Create(Nil) do | |
try | |
// Sends post request and puts the response in a TMemo. | |
// Data is passed as fieldname=fieldvalue format. | |
Memo1.Text := FormPost('http://localhost/test/post.php','test1=test2'); | |
finally | |
Free; | |
end; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment