Jersey client to download and save file

前端 未结 4 1674
一生所求
一生所求 2021-01-18 00:00

I Am new to jersey/JAX-RS implementation. Please find below my jersey client code to download file:

 Client client = Client.create();
 WebResource wr = clien         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-18 00:40

    This sample code below may help you.

    https://stackoverflow.com/a/32253028/15789

    This is a JAX RS rest service, and test client. It reads bytes from a file and uploads the bytes to the REST service. The REST service zips the bytes and sends it back as bytes to the client. The client reads the bytes and saves the zipped file. I had posted this as a response to another thread.

提交回复
热议问题