I want to make a request to a Flash Server with Ruby. I would like to make an AMF request body the same as the followings (Charles log)
data = [{
:method => "load",
:service => "start.game",
:player_delta => {:stamina => 0},
:sequence_num => self.sequence_num,
:transaction_time => Time.now.to_i.to_s,
:icp => 0,
}]
env = RocketAMF::Envelope.new :amf_version => 3
env.messages << RocketAMF::Message.new('BatchController.authenticate_iphone', '/1', data)
body = env.to_s
res = RestClient.post "http://localhost/amf", env.to_s,
:content_type => 'application/x-amf'
The problem is that I get this:
This question was already asked in another post but nobody answered: Link

