【发布时间】:2017-11-20 12:32:25
【问题描述】:
提交 alpacajs 表单时,似乎没有指定内容类型标头的选项。
所有表单都以 application/x-www-form-urlencoded 的形式提交,这对我来说有点奇怪,因为 Alpaca 都是关于 json 的。它也没有在文档中列出。
所以我的问题是:如何将表单提交为 JSON 内容类型?
Laravel 在其文档“When sending JSON requests to your application, you may access the JSON data via the input method as long as the Content-Type header of the request is properly set to application/json”中声明了以下内容。
【问题讨论】:
标签: javascript alpacajs