Read multipart/mixed response in Java/Groovy

后端 未结 2 917
失恋的感觉
失恋的感觉 2021-01-06 18:15

I am getting a \"multipart/mixed\" response to an http request that I need to parse. One part of the response is a pdf file which I need to save to disk. Is the

2条回答
  •  长情又很酷
    2021-01-06 18:42

    Have you tried retrieving it from the request?

     CommonsMultipartFile file = request.getFile('myFile') //File
     def offerId = params.offerId //Standard Param
     def index = params.idx //Standard Param
    

    This corresponds to a form input like below:

    
    

提交回复
热议问题