Added handling of PUT queries.