@Override
public Response execute(Request request) throws IOException {
Uri uri = Uri.parse(request.getUrl());
List<String> pathSegments = uri.getPathSegments();
String model = pathSegments.get(pathSegments.size() - 1).replace(".json", "");
String path = String.format("test/%s/%s_INDEX.json", model, model);
String responseString = convertStreamToString(App.getContext().getAssets().open(path));
return new Response(
request.getUrl(),
200,
"Success",
Collections.<Header>emptyList(),
new TypedByteArray(
"application/json",
responseString.getBytes()
)
);
}
}