MCPcopy Create free account
hub / github.com/dreamhead/moco / attachment

Method attachment

moco-core/src/main/java/com/github/dreamhead/moco/Moco.java:682–686  ·  view source on GitHub ↗
(final String filename, final Resource resource)

Source from the content-addressed store, hash-verified

680 }
681
682 public static ResponseHandler attachment(final String filename, final Resource resource) {
683 return AndResponseHandler.and(
684 with(header(HttpHeaders.CONTENT_DISPOSITION, format("attachment; filename=%s", checkNotNullOrEmpty(filename, "Filename should not be null or empty")))),
685 with(checkNotNull(resource, "Resource should not be null")));
686 }
687
688 public static ResponseHandler join(final MocoGroup group) {
689 return new JoinResponseHandler(checkNotNull(group, "group should not be empty"));

Callers 2

createResponseHandlerMethod · 0.80

Calls 5

andMethod · 0.95
withMethod · 0.95
headerMethod · 0.95
checkNotNullOrEmptyMethod · 0.80
formatMethod · 0.65

Tested by 1