checking if content-type is in the header appropriately, trying for json by default