rest api get and post example