I’m not sure why it is formatting as an XML request. When I use a plain HTML call like the one below it works perfectly. Any idea how I could use a script like the one below in Hype?
If you are on the same IP, you do not need to call HTTP, just call localhost/loop-mode.
As for the XML request there must be something thats requesting that format, perhaps if you are bringing over html, you should confirm that in the call, rather than text.
Personally, if you are doing a number of .posts, you are best creating a function to handle them, rather than using many with the correct format, more so for debugging:
I wasn’t on the same domain (one controller was on port 80 and the other on 8080. Moving them both to the same server and addressing the function as you suggest fixed the issue.
It depends on when you want to make a post call, but the basic flow would be to add an on click handler that runs javascript, and then paste the code there. This example also uses jquery, so you’ll either need to import that library to the Resources Library in the .hype document, or link to a CDNed version in the head HTML. Feel free to elaborate on what you’re trying to do (in another topic if it isn’t too related to this one).