CORS issue on Http Get method on N1QL request


#1

Hi,
I have been facing problem with CORS. i followed CORS Config after enable this.

My N1QL requesting working but not on GET requests. Please guide me to resolve this issue.


#2

I don’t have the resolution, but you should be able to use HTTP POST for all N1QL requests.


#3

@geraldss,

 hey how can i run following service. post instead of get service.

select email, META(d).id from default d where accountNumber = ‘123456’ AND documentType = ‘ClientModel’ AND email = ‘srinadh.k@stellentsoft.com’ AND emailPassword = ‘password’


#4

How are you issuing N1QL queries? Are you using an SDK, or cbq shell? What version of Couchbase are you running?


#5

Im using jquery running on couchbase server 4.4.x

here is the query im testing on post man its working good. when coming to jquery. im getting cors issue. how can i use following link as POST method instead of GET.

http://localhost.com:8093/query/service?statement=select email, META(d).id from default d where accountNumber = ‘123456’ AND documentType = ‘ClientModel’ AND email = ‘srinadh.k@stellentsoft.com’ AND emailPassword = ‘password’


#6

Here you go:

https://www.google.com/?gws_rd=ssl#q=jquery+http+post


#7

I have a doubt, how i will use GET method as POST method. can you please prepare POST query for following GET request.

select email, META(d).id from default d where accountNumber = ‘123456’ AND documentType = ‘ClientModel’ AND email = ‘srinadh.k@stellentsoft.com’ AND emailPassword = ‘password’


#8

I understand. You will have to go through the links I sent you and try it out. You will do fine.


#9

Thank you @geraldss i will check list.