如何解决如何将HTML表单输入作为JSON重定向到API网关
我正在尝试构建将接受“用户名”和“电子邮件”作为输入的Web表单。提交后,我需要将该输入以json格式发送到AWS API网关。但是无法通过HTML将json发送到action = api网关链接。
这就是我想要做的:
<form id="launch-form" class="slides-form" action="https://test.execute-api.us-east-1.amazonaws.com/test/" method="post">
<input type="text" class="rounded input-9 ae-4 fromCenter" name="name" value = "username" placeholder="username"/>
<input type="email" class="rounded input-9 ae-6 fromCenter" name="user-email" value="email" placeholder="Email"/>
<button type="submit" class="button blue rounded button-9 ae-7 fromCenter" name="button">Launch</button>
我可以访问URL,但不能发送json格式。我将如何实现这一目标?
谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。