使用httr的Javascript请求

使用httr的Javascript请求,javascript,html,json,r,rest,Javascript,Html,Json,R,Rest,我正在尝试通过Javascript表单自动提交 可在此处请求数据: 答复是,必须至少提供一个项目和电子邮件。好像没有向REST提供任何信息 我通过谷歌Chrome开发工具进行了跟踪。“body”遵循请求有效负载的格式。这是我通过表格提交的其他信息。我可以离开R。只是不知道我在做什么。任何帮助都会很好 **Request headers** Accept:application/json, text/javascript, */*; q=0.01 Accept-Encoding:gzip, def

我正在尝试通过Javascript表单自动提交

可在此处请求数据:

答复是,必须至少提供一个项目和电子邮件。好像没有向REST提供任何信息

我通过谷歌Chrome开发工具进行了跟踪。“body”遵循请求有效负载的格式。这是我通过表格提交的其他信息。我可以离开R。只是不知道我在做什么。任何帮助都会很好

**Request headers**
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:154
Content-Type:application/json
Cookie:_gat_GSA_ENOR0=1; _ga=GA1.3.1106617633.1453162177; _gat_GSA_ENOR1=1
Host:www.ngdc.noaa.gov
Origin:http://www.ngdc.noaa.gov
Referer:http://www.ngdc.noaa.gov/next-web/cart.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
X-Requested-With:XMLHttpRequest

**Response headers**
Access-Control-Allow-Credentials:true
Access-Control-Allow-Origin:http://www.ngdc.noaa.gov
Connection:close
Content-Length:710
Content-Type:application/json;charset=UTF-8
Date:Sun, 13 Mar 2016 17:29:36 GMT
Location:http://www.ngdc.noaa.gov/next-web/rest/orders/60985
X-Frame-Options:SAMEORIGIN

**General**
Request URL:http://www.ngdc.noaa.gov/next-web/rest/orders
Request Method:POST
Status Code:201 Created
Remote Address:140.172.184.1:80
**Request headers**
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:154
Content-Type:application/json
Cookie:_gat_GSA_ENOR0=1; _ga=GA1.3.1106617633.1453162177; _gat_GSA_ENOR1=1
Host:www.ngdc.noaa.gov
Origin:http://www.ngdc.noaa.gov
Referer:http://www.ngdc.noaa.gov/next-web/cart.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
X-Requested-With:XMLHttpRequest

**Response headers**
Access-Control-Allow-Credentials:true
Access-Control-Allow-Origin:http://www.ngdc.noaa.gov
Connection:close
Content-Length:710
Content-Type:application/json;charset=UTF-8
Date:Sun, 13 Mar 2016 17:29:36 GMT
Location:http://www.ngdc.noaa.gov/next-web/rest/orders/60985
X-Frame-Options:SAMEORIGIN

**General**
Request URL:http://www.ngdc.noaa.gov/next-web/rest/orders
Request Method:POST
Status Code:201 Created
Remote Address:140.172.184.1:80