OKhttp PUT example : <p>My requirement is to use <code>PUT</code>, send a header and a body to server which will update something in the database.</p>

<p>I just read <a href="http://square.github.io/okhttp/">okHttp documentation</a> and I was trying to use their <code>POST</code> example but it doesn't work for my use case <strong>(I think it might be because the server requires me to use <code>PUT</code> instead of <code>POST</code>)</strong>.</p>

<p>This is my method with <code>POST</code>:</p>

<pre><code> public void postRequestWithHeaderAndBody(String url, String header, String jsonBody) {


        MediaType JSON = MediaType.parse("application/json; charset=utf-8");
        RequestBody body = RequestBody.create(JSON, jsonBody);

        OkHttpClient client = new OkHttpClient();

        Request request = new Request.Builder()
                .url(url)
                .post(body)
                .addHeader("Authorization", header)
                .build();

        makeCall(client, request);
    }
</code></pre>

<p>I have tried to search for okHttp example using <code>PUT</code>with no success, if I need to use <code>PUT</code>method is there anyway to use okHttp?</p>

<p>I'm using okhttp:2.4.0 (just in case), thanks on any help!</p>
