Heello / Issues

Bug and feature tracking
1 stars 0 forks source link

endpoint /pings/pings returns HTTP 406 #2

Closed katanacrimson closed 11 years ago

katanacrimson commented 11 years ago

Relevant unit test from node-heello:

describe('pings endpoints -', function() {
        it('GET /pings/pings (heello.pings.pings)', function(done) {
            heello.pings.pings(null, function(err, res) {
                assert.ifError(err, 'request error')
                assert(res.response instanceof Array, 'response should be an array')
                done()
            })
        })
// ...

related node-heello issue: https://github.com/damianb/node-heello/issues/1

As a note: node-heello sends a specific Accept header for all requests: req.set('Accept', 'application/vnd.heello.' + this.conf.apiVersion) - this.conf.apiVersion is currently set to "1".

caseym commented 11 years ago

Please post the full request and response where an HTTP 406 is returned. I am unable to reproduce. It is behaving predictably for me.

404 Not Found on GET /pings/pings when a 'key' param is supplied 401 Unauthorized on GET /pings/pings when the 'key' param is missing.

katanacrimson commented 11 years ago

...wait a minute. It's not /pings/pings, it's just a GET to /pings according to your own documentation. Apologies for that mixup, that's on me.

Related documentation: https://developer.heello.com/docs/1/GET/pings/pings

Still 406's though.

caseym commented 11 years ago

Looks like there was a mistake in the docs for the URL as specified in the details section. It has been corrected and confirmed working...

The correct url is https://api.heello.com/pings.json

curl -i https://api.heello.com/pings.json?key=APP_KEY

HTTP/1.1 200 OK Cache-Control: max-age=0, private, must-revalidate Content-Type: application/json; charset=utf-8 Date: Fri, 19 Apr 2013 15:59:59 GMT ETag: "1f4e6c11cf9f074f4180fa34de6f93c3" Server: nginx/1.2.4 Status: 200 OK X-Rack-Cache: miss X-RateLimit-Limit: 8400 X-RateLimit-Remaining: 8399 X-Request-Id: aff5d4cf4bd1cffd58de3670aabfd247 X-Runtime: 0.575298 X-UA-Compatible: IE=Edge,chrome=1 Content-Length: 26208 Connection: keep-alive

katanacrimson commented 11 years ago

That'd be my problem. Route mapping in node-heello has been corrected, test now passes.

Thanks for the help.