public HttpSource postFromFile(File file) {
		String command = String.format(
				"http post --target http://localhost:%d --file \"%s\"",
				port, FixtureUtils.handleShellEscapeProcessing(file.getAbsolutePath()));
		if (contentType != null) {
			command += String.format(" --contentType \"%s\"", contentType);
		}
		CommandResult result = shell.executeCommand(command);
		Assert.isTrue(result.isSuccess());
		return this;
	}
Attempts connections to the source until it is ready to accept data.
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/fixtures/HttpSource.java