FujiNetWIFI / fujinet-firmware

8-bit systems to ESP32 WiFi Multifunction Firmware
https://fujinet.online
GNU General Public License v3.0
218 stars 66 forks source link

Add ability to do raw data POST #716

Open tschak909 opened 2 months ago

tschak909 commented 2 months ago

from discord thread:

curl --location 'http://192.168.2.69’ \
--header 'Content-Type: application/json' \
--data-raw '{
    “Namne: “Paulo “Garcia,
    “Computer”: “Atari 800
}'
pedgarcia commented 1 week ago

Hey @tschak909 , anyway I can help with this? I haven't look too deeply into the code, but maybe if you point me out in the right direction, I might be able to help with this issue.

Cheers

tschak909 commented 1 week ago

This should give you a trail to show how commands wind up at the network device, and the protocol adapter:

https://github.com/FujiNetWIFI/fujinet-firmware/blob/master/src/main.cpp#L502 https://github.com/FujiNetWIFI/fujinet-firmware/blob/master/lib/bus/sio/sio.cpp#L402 https://github.com/FujiNetWIFI/fujinet-firmware/blob/master/lib/device/sio/network.cpp#L859 https://github.com/FujiNetWIFI/fujinet-firmware/blob/master/lib/device/sio/network.cpp#L645 https://github.com/FujiNetWIFI/fujinet-firmware/blob/master/lib/network-protocol/HTTP.cpp#L78

Hopefully this helps.

We can answer questions as you have them, in the discord: https://discord.gg/2Ce9guX :)

-Thom

pedgarcia commented 1 week ago

Perfect, thanks. Let's see if I can un-rust my C :)