I would like to generate encrypt data and send it from http://localhost:8888/A/B to http://localhost:8888/C/D in json format.
What is the best way possible?
Users will be using only http://localhost:8888/A/B, so when ever a request comes in for a http://localhost:8888/A/B a hash key will be generated and sent to http://localhost:8888/C/D where the database query will happen before doing that it has to decrypt the data and check if the user is a valid one.
Use
cURLto send any data anywhere. It is very flexible and configurable for any case. You can use eitherPOSTorGETmethods to send data.