Fixed PHP do_request to support content types other than JSON