Changed hash method for headers and fixed malformed json format.