0
如何使用RestClient在帖子中发送用户名和密码?我的客户端代码如下:如何使用RestClient发送用户名和密码
response = RestClient.post 'http://localhost:3000/api/rules',
:name => "me", :password => "12345",
:books => {:book_name => "Harry Porter",
:author => "JR"}
服务器代码是在Rails和利用`http_basic_authenticate_with的:名称=> “我”,:密码=> “12345”。