2016-03-02 11 views

答えて

31
RequestBody reqbody = RequestBody.create(null, new byte[0]); 
    Request.Builder formBody = new Request.Builder().url(url).method("POST",reqbody).header("Content-Length", "0"); 
    clientOk.newCall(formBody.build()).enqueue(OkHttpCallBack()); 
+0

は、それはあなたが答えるか質問あります? –

+1

これで何が新しくなったのですか?私は同じものを持っています[https://github.com/square/okhttp/issues/751](https://github.com/square/okhttp/issues/751) –

10

これが私の仕事:

RequestBody body = RequestBody.create(null, new byte[]{}); 
+1

または 'RequestBody.create(null、" ") ' – mr5

関連する問題