Closed scrubpayjay closed 9 years ago
i believe this error is happening for accept
header hash.
That is header: { name: 'Accept', value: 'application/vnd.scrubpay.com; version=1' }
this line of code is the problem i guess.
You've configured the API version to use the Accept header to specify the requested version. Are you sending the Accept header in your request and setting it to the configured value?
Thank you very much for your valuable feedback.
I already specified the Accept
header like below:
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8
Authorization:Bearer 5620eb92ed68928e446cd4f204b871c3d6c178b4c00199ed8751cddbf74ceb5a
Connection:keep-alive
Content-Type:application/json
Host:localhost:3000
If-None-Match:"84242edbe8f46112871a1420093e976b"
Origin:http://localhost:9000
Referer:http://localhost:9000/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/41.0.2272.76 Chrome/41.0.2272.76 Safari/537.36
Any suggestion did i missed something in the Accept
header option
I don't see the version you configured in your routes ('application/vnd.scrubpay.com; version=1') in the Accept header above....
can you please give some idea how to include version
in my ajax request uri.
@bploetz i am really great-full to you for pointing me out that i was missing Accept
header.And now its fixed. Thank you very much
:+1:
I am not sure if my problem is an issue or not. I have cloned a repository from github.Which is basically an api project built with versionist gem. Then i have successfully installed the project. But when i are to access my project from front-end view i got bellow routing error:
I have no idea why this is happening.Because my routes file has the url.Here is my
rake routes
output:In my
Gemfile
source 'https://rubygems.org'
my
routes
fileCould you please help me why this routing error is happening ? When i change my
routes
file tonamespace
instead of versionist like bellowThen its working fine. But its not working when i am using
api_version()
method .can any one tell me what is the reason behind this problem? thank you.