/** * Loads the content from the given asset */ public static InputStream asset(String name) { return AndroidResources.asset(RuntimeEnvironment.application, name); }
public Response.Builder respond(int code, @Nullable ResponseBody body) { FinalRuleBuilder builder = new FinalRuleBuilder(); builder.code(code); builder.body(body != null ? body : ResponseBody.create(null, "")); onBuild(builder.buildRule()); return builder; }
public Builder param(String param, String value) { paramMatches(param, exact(value)); return this; }
public Response.Builder respond(int code) { return respond(code, (ResponseBody) null); }
@Override void onBuild(Rule rule) { addRule(rule); }
public Builder method(String method) { matches(new MethodMatcher(method)); return this; }
public Builder delete() { method(DELETE); return this; }
public Builder get() { method(GET); return this; }
public Builder post() { method(POST); return this; }
public Builder put() { method(PUT); return this; }