Jsoup を使用して、生の本文を POST リクエストに渡す必要があります。
final Connection connect = Jsoup.connect(url);
connect.method(Connection.Method.POST);
String rawBody = // a JSON string representing JSON-RPC call
// fails here "Must supply an even number of key value pairs"
connect.data(rawBody);
final Connection.Response response = connect.execute();
私が理解しているように、キーと値のペアが必要です。生の体を渡す方法はありますか?
PS私はすでにHTTP投稿を作成するコードを持っておりHttpURLConnection
、これに比較的低レベルのコードではなくJsoupを使用するようにアップグレードしたいと考えていました。