You can go at least 2 ways:
1) you can build an http request that simulates the upload of a file, putting all the data you want in this "virtual" file. This requires no programming on the HFS side, as the upload is a provided service, just configure upload permissions.
2) you make the same "json" requests that you are talking about, just to the proper net address, where HFS is.
Then you will have to define in HFS how to react to such requests.
The default template of HFS already uses requests like that to offer some features. You can find them in sections whose name starts by "ajax."
In there you need to use its own scripting system.