rest api get and post syntax with examples