port YYHRequest to Swift for fun