I'm trying to integrate my application to RabbitMQ. I want to send a request to my localhost, so what should be the HTTP header and its value?
Do I need a username and password to access localhost via a HTTP request?
I'm trying to integrate my application to RabbitMQ. I want to send a request to my localhost, so what should be the HTTP header and its value?
Do I need a username and password to access localhost via a HTTP request?
yes you have to add username and password:
Suppose to have username and pwd as test
test
it will be:
curl -X PUT -H "Content-Type: application/json" -d '{"auto_delete":false,"durable":true,"arguments":[]}' -u test:test http://localhost:15672/api/queues/%2f/my_queue
publish a message to a queue:
curl -s -X POST -H "Content-Type: application/json" -d '{"properties":{"delivery_mode":2}, "routing_key":"my_queue","payload":"message test ","payload_encoding":"string"}' -u test:test http://localhost:15672/api/exchanges/%2f/amq.default/publish
get the queues:
curl -X GET -u test:test http://localhost:15672/api/queues/%2F
Here all the API