diff --git a/README.md b/README.md index 0dcb4c8..d04984c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Stabber acts as a stubbed XMPP service for testing purposes, the API allows: * Responding to XMPP stanzas with stubbed responses. * Verifying that XMPP stanzas were received. -An HTTP API is also included, currently only supporting the send operation. +An HTTP API is also included, currently only supporting the `stbbr_send` and `stbbr_for` operations. The project is work in progress with only the basics implemented, and is being developed alongside https://github.com/boothj5/profanity Currently the only API is written in C. @@ -125,7 +125,12 @@ The second argument is the HTTP port on which Stabber will listen. To send a message to a client currently connected to Stabber on port 5230, send a POST request to `http://localhost:5231/send` with the body containing the stanza to send, e.g.: ``` -curl --data 'Here is a message sent from stabber, using the HTTP api' http://localhost:5231/send +curl --data 'Here is a message sent from stabber, using the HTTP api' http://localhost:5231/send +``` + +To respond to a stanza with a specfic id sent from the client, send a POST request to `http://localhost:5231/for?id=` where `` is the the id you wish to respond to, e.g.: +``` +curl --data 'heres my answer!' http://localhost:5231/for?id=prof_msg_1 ``` # Examples