1

content-type: application/x-www-form-urlencoded でリクエストを投稿しようとしています。しかし、Charles (または Fiddler) でリクエストを表示すると、application/json と表示されます。

        HTTP.post(url, 
            {
                :headers => {"Content-Type" => "application/x-www-form-urlencoded"}
            }) do |response| 
            puts response
            puts response.body.to_str
        end
4

1 に答える 1

0
BW::HTTP.post("http://foo.bar.com/", {payload: data, headers: {"Content-Type": "application/x-www-form-urlencoded"} }) do |response|
于 2014-05-22T12:31:21.360 に答える