|
|
@ -1,6 +1,6 @@ |
|
|
|
# api root |
|
|
|
# api root |
|
|
|
|
|
|
|
|
|
|
|
*Generated: Fri Sep 12 2014 19:16:14 GMT+0100 (BST)* |
|
|
|
*Generated: Fri Sep 12 2014 20:51:45 GMT+0100 (BST)* |
|
|
|
## Request |
|
|
|
## Request |
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
{ |
|
|
|
{ |
|
|
@ -16,17 +16,18 @@ |
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
Status: 200 |
|
|
|
Status: 200 |
|
|
|
{ |
|
|
|
{ |
|
|
|
"x-powered-by": "pelias", |
|
|
|
"x-powered-by": "mapzen", |
|
|
|
"charset": "utf8", |
|
|
|
"charset": "utf8", |
|
|
|
"access-control-allow-origin": "*", |
|
|
|
"access-control-allow-origin": "*", |
|
|
|
"access-control-allow-methods": "GET", |
|
|
|
"access-control-allow-methods": "GET", |
|
|
|
"access-control-allow-headers": "X-Requested-With,content-type", |
|
|
|
"access-control-allow-headers": "X-Requested-With,content-type", |
|
|
|
"access-control-allow-credentials": "true", |
|
|
|
"access-control-allow-credentials": "true", |
|
|
|
|
|
|
|
"server": "Pelias/0.0.0", |
|
|
|
"cache-control": "public,max-age=60", |
|
|
|
"cache-control": "public,max-age=60", |
|
|
|
"content-type": "application/json; charset=utf-8", |
|
|
|
"content-type": "application/json; charset=utf-8", |
|
|
|
"content-length": "50", |
|
|
|
"content-length": "50", |
|
|
|
"etag": "W/\"32-85536434\"", |
|
|
|
"etag": "W/\"32-85536434\"", |
|
|
|
"date": "Fri, 12 Sep 2014 18:16:14 GMT", |
|
|
|
"date": "Fri, 12 Sep 2014 19:51:44 GMT", |
|
|
|
"connection": "close" |
|
|
|
"connection": "close" |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
@ -41,9 +42,14 @@ Status: 200 |
|
|
|
|
|
|
|
|
|
|
|
## Tests |
|
|
|
## Tests |
|
|
|
|
|
|
|
|
|
|
|
### ✓ vanity header correctly set |
|
|
|
### ✓ content-type header correctly set |
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
response.should.have.header 'X-Powered-By','pelias' |
|
|
|
response.should.have.header 'Content-Type','application/json; charset=utf-8' |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### ✓ endpoint available |
|
|
|
|
|
|
|
```javascript |
|
|
|
|
|
|
|
response.statusCode.should.equal 200 |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### ✓ cache-control header correctly set |
|
|
|
### ✓ cache-control header correctly set |
|
|
@ -51,19 +57,20 @@ response.should.have.header 'X-Powered-By','pelias' |
|
|
|
response.should.have.header 'Cache-Control','public,max-age=60' |
|
|
|
response.should.have.header 'Cache-Control','public,max-age=60' |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### ✓ endpoint available |
|
|
|
### ✓ charset header correctly set |
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
response.statusCode.should.equal 200 |
|
|
|
response.should.have.header 'Charset','utf8' |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### ✓ content-type header correctly set |
|
|
|
### ✓ server header correctly set |
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
response.should.have.header 'Content-Type','application/json; charset=utf-8' |
|
|
|
response.should.have.header 'Server' |
|
|
|
|
|
|
|
response.headers.server.should.match /Pelias\/\d{1,2}\.\d{1,2}\.\d{1,2}/ |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### ✓ charset header correctly set |
|
|
|
### ✓ vanity header correctly set |
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
response.should.have.header 'Charset','utf8' |
|
|
|
response.should.have.header 'X-Powered-By','mapzen' |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### ✓ should respond in json with server info |
|
|
|
### ✓ should respond in json with server info |
|
|
|