Jacques Koekemoer
Jacques Koekemoer

Reputation: 1414

Using Delphi and HTTP POST to do web actions

I have a web application which I wrote in PHP. Each of my forms do an HTTP POST to a PHP file which processes the data and returns a result.

Now I want to use RAD Studio's Delphi XE4 to create an application which can be used on phones to perform basic functions on the site.

For example... I have a function in my PHP file called F.

F Does some calculations with parameters passed using the $_REQUEST[''] directive.

So my question is: is there a way that I can use Delphi to post to my website and return the result.

I've searched for similar requests but no-one seems to have done this before. I would even use a JavaScript file if someone can tell me how I can incorporate it?

I know jQuery has a $.ajax method, is there maybe a way to implement that?

Upvotes: 1

Views: 3942

Answers (1)

Wouter van Nifterick
Wouter van Nifterick

Reputation: 24096

I can assure you that you're not the first person to do an HTTP request via Delphi :)

You state that you're fetching the request data via $_REQUEST, so you'll get both POST and GET data, so perhaps these links might be of interest:

What's the simplest way to call Http GET url using Delphi?

What’s the simplest way to call Http POST url using Delphi?

Upvotes: 3

Related Questions