proper encoding for PUT and DELETE calls