Send put and post requests as json