diff --git a/README.md b/README.md index 01577e0..6e2795b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ starwood.search({ Response JSON would like this: ```js -{ id: '3482', +{ + id: '3482', thumbnail: '/pub/media/3482/str3482po.134187_md.jpg', name: '三亚亚龙湾瑞吉度假酒店', country: '中国,', diff --git a/lib/apis.js b/lib/apis.js index 3044924..df6b943 100644 --- a/lib/apis.js +++ b/lib/apis.js @@ -3,8 +3,12 @@ var debug = require('debug')('starwood'); var trim = require('trim'); var utils = require('./utils'); +// Request host exports.host = 'https://www.starwoodhotels.com/'; +// Request rules, contains request.headers +// `all` means this kind of rule will be append to request's option +// in both `GET`, `POST` ,`PUT`, `DELETE` methods. exports.rules = { all: { headers: {