The general way to do this is to send a POST to http://mydomain.com/hs/add with content:
name=John&score=987 (for simple data with urlencoded it will differ, for example, from multipage encoded data, the format of the body of the POST request is arbitrary and goes beyond the recommendations of REST - it can even be arbitrary encrypted data, as others suggested).
A GET request to add a new record will be not only a violation of REST principles, but also a violation of RFC 2616 , which requires that GET requests are idempotent.
EDIT
Is it wrong to pass data to the query string and send an empty body?
Yes. The URL should describe the resource that is exposed to the action described by the HTTP method. Therefore, probably the best option would be to have http://mydomain.com/hs as the URL and allow the body to fully describe the action.
The query string can be used to further process queries without a body, for example:
http://mydomain.com/hs?period=lastmonth (GET)
Artefacto
source share