Google使用jQuery$放置bump。post给出错误:HTTP/1.1400错误请求
我正在使用GooglePlaces并试图向GoogleAPI发送一个bump(或签入)请求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
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访问,因此您的浏览器拒绝该帖子