@Override public void sendRequest(Operation op) { if (locale != null) { op.addRequestHeader(Operation.ACCEPT_LANGUAGE_HEADER, locale); } super.sendRequest(op); }
/** * Issue a patch request to the specified service * * @param service * Service to issue the patch to * @param body * Patch body */ public static void sendPatch(StatefulService service, Object body) { Operation patch = Operation .createPatch(service.getUri()) .setBody(body); service.sendRequest(patch); }
/** * Issue a patch request to the specified service * * @param service * Service to issue the patch to * @param body * Patch body */ public static void sendPatch(StatefulService service, Object body) { Operation patch = Operation .createPatch(service.getUri()) .setBody(body); service.sendRequest(patch); }
service.sendRequest(Operation.createGet(service, hostPortProfileLink) .setCompletion((o, e) -> { if (o.getStatusCode() == Operation.STATUS_CODE_NOT_FOUND || request.containerLink = oldContainerState.documentSelfLink; service.sendRequest( Operation.createPatch(service, profile.documentSelfLink) .setBody(request)
/** * Helper method to send a patch to the specified service * * @param service sevice to send the patch to * @param body patch body */ private static void sendPatch(StatefulService service, Object body) { Operation patch = Operation .createPatch(service.getUri()) .setBody(body) .setCompletion( (o, ex) -> { if (ex != null) { service.logWarning("Self patch failed: %s", Utils.toString(ex)); } }); service.sendRequest(patch); }
Boolean.TRUE.toString()); service.sendRequest(Operation .createPatch(service, patch.documentSelfLink) .addPragmaDirective(Operation.PRAGMA_DIRECTIVE_QUEUE_FOR_SERVICE_AVAILABILITY) service.sendRequest(Operation .createPatch(service, containerState.documentSelfLink) .setBody(patchState)
returnLatestOrFail(nonTransactionResponse, get, fr); }); s.sendRequest(nonTransactionQueryOp); } else { returnLatestOrFail(response, get, fr); s.sendRequest(inTransactionQueryOp); } else { Operation nonTransactionQueryOp = buildLatestNonTransactionQueryTaskOp(s, authContext) returnLatestOrFail(response, get, fr); }); s.sendRequest(nonTransactionQueryOp);
service.sendRequest(Operation .createDelete( service, notificationTaskLink) service.sendRequest(Operation .createDelete( service, notificationTaskLink)
service.sendRequest(Operation .createDelete( service, notificationTaskLink) service.sendRequest(Operation .createDelete( service, notificationTaskLink)
.setCompletion((o, f) -> unshadowQueryCompletion(s, st, o, f, request)); startPost.setAuthorizationContext(authContext); s.sendRequest(startPost);
this.parent.sendRequest(operation); }).setReferer(this.parent.getUri());