Reputation: 133
I am building a spring boot rest API in which. I want to send the file via HTTP from one spring rest API application to another rest API application and get a response whether the file successfully sends or not.
more explanation about the above scenario
I have 2 spring-rest-API. one running on port 4000 and another on 5000 on the local machine. I want to send a file from 4000 port rest API to 5000 port rest-API via post request and 5000 port rest-API will give a response whether the file successfully received or not. as this process is asynchronous. I also want to know how to handle it asynchronously.
Thanks in advance.
Upvotes: 0
Views: 1204
Reputation: 75
My little suggestion is u can try to send the file content between the API or like @razvan said. Different port wouldn't be an obstacle to call each other.
Upvotes: 0
Reputation: 1373
REST APIs are not designed to send files. You can send information about where a file is located(like a repository or cloud storage) so that the other end can take it from there, but not the file itself.
Upvotes: 1