added code for put and get request