rkt: refactor fetch

@philips @jonboulle Shall we put this into the utility of the spec?