1

How to generate a chunked transfer encoding HTTP request in Android ? The code below did not do the trick for me.

    HttpURLConnection  cn = (HttpURLConnection)(new URL(url)).openConnection();  
    cn.setRequestProperty("Transfer-Encoding", "chunked");
1
  • 1
    Does the URL you are connecting to support returning chunked transfer encoded data? Can you use cURL or wget or some other language and get chunked transfer encoded data by just setting the header? Commented Aug 4, 2011 at 3:50

1 Answer 1

1

You can't request that the response is chunked. The server isn't even required to be able to generate chunked response.

What you are doing by sending that header, is telling the server that the content of the request is in chunked encoding.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.