Skip to content

Create OkHttp3 Response for testing

Use a variation of the following code to create a Response to test with:

private Response createResponse()
        HttpUrl mHttpUrl = new HttpUrl.Builder()
        Request mRequest = new Request.Builder()

        Response.Builder builder = new Response.Builder()



Published inJavaProgramming

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *