Make uri optional, add helper methods request_{tcp,unix,pipe}, add tests