public static Statement saveHttpResponseTo(URI source, String dir, String file) { return new SaveHttpResponseTo(dir, file, "GET", source, ImmutableMultimap.<String, String> of()); }
public static Statement saveHttpResponseTo(URI source, String dir, String file) { return new SaveHttpResponseTo(dir, file, "GET", source, ImmutableMultimap.<String, String> of()); }
public static Statement saveHttpResponseTo(URI source, String dir, String file) { return new SaveHttpResponseTo(dir, file, "GET", source, ImmutableMultimap.<String, String> of()); }
public static Statement saveHttpResponseTo(URI source, String dir, String file) { return new SaveHttpResponseTo(dir, file, "GET", source, ImmutableMultimap.<String, String> of()); }
public static Statement saveHttpResponseTo(URI source, String dir, String file) { return new SaveHttpResponseTo(dir, file, "GET", source, ImmutableMultimap.<String, String> of()); }
public static Statement saveHttpResponseTo(URI source, String dir, String file) { return new SaveHttpResponseTo(dir, file, "GET", source, ImmutableMultimap.<String, String> of()); }
public void testSaveHttpResponseToDirAndFileUNIX() { SaveHttpResponseTo testWithDir = new SaveHttpResponseTo("/tmp", "install", "GET", URI.create("https://adriancolehappy.s3.amazonaws.com/java/install"), ImmutableMultimap.of("Host", "adriancolehappy.s3.amazonaws.com", "Date", "Sun, 12 Sep 2010 08:25:19 GMT", "Authorization", "AWS 0ASHDJAS82:JASHFDA=")); assertEquals( testWithDir.render(OsFamily.UNIX), "(mkdir -p /tmp && cd /tmp && [ ! -f install ] && curl -q -s -S -L --connect-timeout 10 --max-time 600 --retry 20 -C - -X GET -H \"Host: adriancolehappy.s3.amazonaws.com\" -H \"Date: Sun, 12 Sep 2010 08:25:19 GMT\" -H \"Authorization: AWS 0ASHDJAS82:JASHFDA=\" https://adriancolehappy.s3.amazonaws.com/java/install >install)\n"); }
public void testSaveHttpResponseToDirAndFileUNIX() { SaveHttpResponseTo testWithDir = new SaveHttpResponseTo("/tmp", "install", "GET", URI.create("https://adriancolehappy.s3.amazonaws.com/java/install"), ImmutableMultimap.of("Host", "adriancolehappy.s3.amazonaws.com", "Date", "Sun, 12 Sep 2010 08:25:19 GMT", "Authorization", "AWS 0ASHDJAS82:JASHFDA=")); assertEquals( testWithDir.render(OsFamily.UNIX), "(mkdir -p /tmp && cd /tmp && [ ! -f install ] && curl -q -s -S -L --connect-timeout 10 --max-time 600 --retry 20 -C - -X GET -H \"Host: adriancolehappy.s3.amazonaws.com\" -H \"Date: Sun, 12 Sep 2010 08:25:19 GMT\" -H \"Authorization: AWS 0ASHDJAS82:JASHFDA=\" https://adriancolehappy.s3.amazonaws.com/java/install >install)\n"); }
public synchronized Statement getAsSaveToStatement(String target, String name) throws IOException { HttpRequest req = getSignedRequest(name); return new SaveHttpResponseTo(target, name, req.getMethod(), req.getEndpoint(), req.getHeaders()); }
public synchronized Statement getAsSaveToStatement(String target, String name) throws IOException { HttpRequest req = getSignedRequest(name); return new SaveHttpResponseTo(target, name, req.getMethod(), req.getEndpoint(), req.getHeaders()); }