adding post method for json.