How to pass JSON and file to rest API in Java?
•
Java
My main question is how to pass JSON and file to send the request to the rest API? What does the spring framework need to work as a client and wait for a response by passing posts using JSON and file?
Options:
>Do I need to use filerepresentation in clientresource? But how do I pass files and JSON? > Pass JSON and file by using resttemplate? How is it used to publish JSON and file?
Are there any other options?
Solution
Sounds like a terrible resource you're trying to expose My suggestion is to divide them into two different requests Maybe JSON has the URI of the file and is requested
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码