how to serialize AMF body and send it with Ruby RocketAMF -


i trying serialized amf body , send restclient.post.

from charles proxy, can deserialized request body , show follows:

# s raw binary request body pp rocketamf::envelope.new.populate_from_stream(s).messages 

enter image description here

however, cannot figure out how serialize such object , send (with restclient.post) in body.

you'll want change url it's using, below correct way it.

require 'rubygems' require 'rocketamf' require 'rest-client'  data = [] # whatever data want env = rocketamf::envelope.new :amf_version => 3 env.messages << rocketamf::message.new('batchcontroller.authenticate_iphone', '/1', data) res = restclient.post "http://localhost:9292/amf", env.to_s, :content_type => 'application/x-amf' puts rocketamf::envelope.new.populate_from_stream(res).inspect 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -