curling REST controllers behind restful_authentication


I am trying to access a REST controller from a Native C# Windows Mobile client and I am having some problems since I am using the restful_authentication plug in.

I decided to test the availability of the resources with curl before trying with windows mobile.

I want to access this resource

When I try to I get the obvious

HTTP Basic: Access denied.

So I though I would try

curl -X GET --basic -u user_name:password

But had the same problem...

I was thinking that maybe I have to somehow remotely add a cookie or create a session but I don't know how to do this.

Can someone help?

Thank you very much,


Got it!

It was a problem with Apache!

Thank you


Kent Fenwick wrote:

Can you elaborate? I had seen this before in one of my projects and I'm curious to know how you solved it.


Hi Jeff,

I tried it out on my local copy and it worked really well.

I still can't access it remotely but that has something to do with the host I am using.

I am using hostingrails and I have opened up a ticket with them. Chances are it has something to do with the FCI or Apache config files.

On my dev machine I switched from Apache to nginx and everything worked very well. Unless you are using passenger I would suggest not using Apache, but that's just my opinion.

Hope this helps, if my host gives me any information I will be happy to post it.

Thanks Jeff,


Jeff Cohen wrote:

Interesting.. thanks a lot for the update.