Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google使用jQuery$放置bump。post给出错误:HTTP/1.1400错误请求_Jquery_Google Places Api - Fatal编程技术网

Google使用jQuery$放置bump。post给出错误:HTTP/1.1400错误请求

Google使用jQuery$放置bump。post给出错误:HTTP/1.1400错误请求,jquery,google-places-api,Jquery,Google Places Api,我正在使用GooglePlaces并试图向GoogleAPI发送一个bump(或签入)请求 bumpReference = {"reference" : "referenceIdObtainedFromNearbySearch"}; $.post('https://maps.googleapis.com/maps/api/place/bump/json?sensor=true&key=MyApiKeyGoesHere',bumpReference, fu

我正在使用GooglePlaces并试图向GoogleAPI发送一个bump(或签入)请求

bumpReference = {"reference" : "referenceIdObtainedFromNearbySearch"};

$.post('https://maps.googleapis.com/maps/api/place/bump/json?sensor=true&key=MyApiKeyGoesHere',bumpReference,
                function(data)
            {
                alert(data.status);//should return OK on success 
            });
由于某种原因,我收到了一个
HTTP/1.1400错误请求的响应
我检查了参考是否正确

这就是他们所说的:
通气是以下形式的HTTP POST请求:

POST https://maps.googleapis.com/maps/api/place/bump/json?sensor=true_or_false&key=AddYourOwnKeyHere HTTP/1.1
Host: maps.googleapis.com

{
  "reference": "place_reference"
}

目前的问题叫做。PlacesAPI不是为JavaScript web应用程序直接使用而设计的,它是为您的服务器端基础设施使用的。因此,我们没有启用CORS访问,因此您的浏览器拒绝该帖子