我有一个基本的html表单,其中包含联系信息字段。像这样,
<form method="post" action="https://MYAPIPATHISHERE.us-east-2.amazonaws.com/dev/contact">
<input name="website" placeholder="Website URL" type="text">
<input name="name" class="email input-standard-grey" placeholder="Your Name" type="text">
<input name="email" placeholder="Email Address" type="email">
<input name="phone" class="email input-standard-grey" placeholder="Phone" type="text">
<textarea name="message" class="email input-standard-grey" placeholder="Message"></textarea>
<button>Submit Now</button>
</form>
&#13;
我有一个像这样的
工作的AWS Lambda API端点https://MYAPIPATHISHERE.us-east-2.amazonaws.com/dev/contact
我试图提交表单。但它不起作用。有时显示内部服务器错误作为响应,有时显示Cross Origin错误。我的网站托管在Github页面中。此API端点在Postman和Curl中运行良好。 Lambda函数在NodeJS中编码。