阅读背景:

为json post请求获取csrf令牌到rails应用程序

来源:互联网 

I have been playing around with using rest-client to access a rails app I have written. I've written a quick script to log in and make a post request. Everything is working but I did have to work round the fact that no authenticity_token is served if you make a request for a form in json. I had to make a regular html request in other get the authenticity_token and then included this in the json I submitted as part of my post request. Basically I have a quick an dirty script like the one belowI have been playing around with using rest-clie




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: