HTTPD library: mobile exchange of small data

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

HTTPD library: mobile exchange of small data

Post by trevix » Thu Sep 12, 2024 1:50 pm

Hello.
Just approaching the HTTPD library, whose simplicity is just great.
I got the example (viewtopic.php?f=11&t=36131) working, with the server stack on a Mac and a browser in another Mac (same LAN).


I must grant, to an external company, the possibility to send to my App a very small array of data (I guees only over a local network).
I cannot use sockets, so I would like to open a web server in my App (HTTPD) and create an URL, with vars to be passed (array or Json), to give to this external company, so that they can start some actions on my App.

While I may mismatch some terminology, it would be sort of an API for my App, available to other compnies that need to send and receive small data to my App.
Can someone give some hint on how to create this URL?
Thanks for any help.
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: HTTPD library: mobile exchange of small data. SOLVED

Post by trevix » Fri Sep 13, 2024 11:55 am

I guess times are changing. I remember the time when, after posting on this forum, I was always getting some help, pretty fast.

Anyway, I solved even with my small knowledge of HTML.

- Put the stack on 2 different devices (mobile or desktop)
- Fix the IP where needed
- Set one device as server clicking on Start
- Do a Post or Get from the other device

Feel free to suggest some improvement: error management, delays, concurrent communication, security, etc.

Regards
Attachments
HTTP-Test2.livecode.zip
(3.91 KiB) Downloaded 394 times
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply