Context:
I have never created something or worked on this subject before but I have done my research and now I know what's the subject.
I have a virtual server machine(machineVM) and not a virtual client machine (machineA).
I should send a HTTP request from machineVM to machineA to a specific port. machineVM sees and knows machineA,i.e, it knows client name of machineA(myClient) via the HTTP request .
I'd like to say to machineA: "I have a document for you, come and get it.". On machineA I will have a windows service that will listen to that port and do its stuff.
That HTTP request should look like:
http:\\myClient:port/request_message_body
What are the possible wayouts to achieve the task?
- HTTP POST ?
- I am aware that HTTP uses port 80. How to decide and which port to use, which port will windows service listen, on which port should HTTP request be sent?
- In this request_message_body I'd like to share a path to the folder from which machineA could fetch the document and to specify server and port.
- How to format HTTP request correctly?
I should be able to create windows service that listens to a port, because I've created few services before, but I really need help with creation of this HTTP request and sending it.
Any help will be appreciated.