App-Bridge How to Send a POST Request to My Server (Submit Form)

johnerck
Shopify Expert
4 0 0

Hi. I'm working on a new embedded app using:

<!DOCTYPE html>
<html>
  <head>
  <script>
    var AppBridge = window['app-bridge'];
    var createApp = AppBridge.default;
    // ... HOW DO I HANDLE AND POSTING FORM VALUES TO MY SERVER?
  </script>
</head>
<body>
<form action="haveJSHandle?" method="post">
<input type="text" name="first_name" value="Example value to post to server" />
<input type="submit" value="Save settings!" />
</form>
</body>
</html>
0 Likes