@Override public String getHttpMethod() { return delegate.getHttpMethod(); }
@Override public String getMethod() { return httpRequest.getHttpMethod(); }
public RequestImpl(final HttpRequest request, final HttpResponse response) { this.headers = request.getHttpHeaders(); this.httpMethod = request.getHttpMethod().toUpperCase(); this.request = request; this.response = response; }
private String requestToString(HttpRequest request) { return "\"" + request.getHttpMethod() + " " + request.getUri().getPath() + "\""; }
public static MockHttpRequest deepCopy(HttpRequest request) throws IOException { MockHttpRequest mock = new MockHttpRequest(); mock.uri = (ResteasyUriInfo) request.getUri(); mock.httpHeaders = (ResteasyHttpHeaders) request.getHttpHeaders(); mock.httpMethod = request.getHttpMethod(); byte[] bytes = ReadFromStream.readFromStream(1024, request.getInputStream()); mock.inputStream = new ByteArrayInputStream(bytes); return mock; }
protected Response handleFailure(HttpRequest request, Failure failure) { if (failure.isLoggable()) LogMessages.LOGGER.failedExecutingError(request.getHttpMethod(), request.getUri().getPath(), failure); else LogMessages.LOGGER.failedExecutingDebug(request.getHttpMethod(), request.getUri().getPath(), failure); Response response = failure.getResponse(); if (response != null) { return response; } else { Response.ResponseBuilder builder = Response.status(failure.getErrorCode()); if (failure.getMessage() != null) builder.type(MediaType.TEXT_HTML).entity(failure.getMessage()); Response resp = builder.build(); return resp; } }
SecurityContext securityContext = ResteasyContext.getContextData(SecurityContext.class); text.append(String.format("baseUri=[%s] requestUri=[%s] method=[%s] authScheme=[%s]", request.getUri().getBaseUri(), request.getUri().getRequestUri(), request.getHttpMethod(), RESTEasyTracingUtils.toStringOrNA(securityContext == null ? null : securityContext.getAuthenticationScheme()))); for (String header : RESTEasyTracingUtils.SUMMARY_HEADERS) {
public CompletionStage<BuiltResponse> invoke(HttpRequest request, HttpResponse response, Object target) { request.setAttribute(ResourceMethodInvoker.class.getName(), this); incrementMethodCount(request.getHttpMethod()); ResteasyUriInfo uriInfo = (ResteasyUriInfo) request.getUri(); if (method.getPath() != null) { uriInfo.pushMatchedURI(uriInfo.getMatchingPath()); } uriInfo.pushCurrentResource(target); BuiltResponse rtn = invokeOnTarget(request, response, target); // FIXME: async return CompletableFuture.completedFuture(rtn); }
public CompletionStage<Object> invokeDryRun(HttpRequest request, HttpResponse response, Object target) { request.setAttribute(ResourceMethodInvoker.class.getName(), this); incrementMethodCount(request.getHttpMethod()); ResteasyUriInfo uriInfo = (ResteasyUriInfo) request.getUri(); if (method.getPath() != null) { uriInfo.pushMatchedURI(uriInfo.getMatchingPath()); } uriInfo.pushCurrentResource(target); return invokeOnTargetDryRun(request, response, target); }
Match match = match(matches, request.getHttpMethod(), request); match.expression.populatePathParams(request, match.matcher, path); logger.log("MATCH_PATH_SELECTED", match.expression.getRegex());
if (!request.getHttpMethod().equalsIgnoreCase("GET") || request.getAttribute(ServerCacheHitFilter.DO_NOT_CACHE_RESPONSE) != null)
@Override public String getHttpMethod() { return delegate.getHttpMethod(); }
@Override public String getHttpMethod() { return delegate.getHttpMethod(); }
@Override public String getMethod() { return httpRequest.getHttpMethod(); }
LogMessages.LOGGER.unknownException(request.getHttpMethod(), request.getUri().getPath(), e); throw new UnhandledException(e);
LogMessages.LOGGER.unknownException(request.getHttpMethod(), request.getUri().getPath(), e);
public RequestImpl(HttpRequest request, HttpResponse response) { this.headers = request.getHttpHeaders(); this.httpMethod = request.getHttpMethod().toUpperCase(); this.request = request; this.response = response; }
public RequestImpl(final HttpRequest request, final HttpResponse response) { this.headers = request.getHttpHeaders(); this.httpMethod = request.getHttpMethod().toUpperCase(); this.request = request; this.response = response; }
public static MockHttpRequest deepCopy(HttpRequest request) throws IOException { MockHttpRequest mock = new MockHttpRequest(); mock.uri = (ResteasyUriInfo) request.getUri(); mock.httpHeaders = (ResteasyHttpHeaders) request.getHttpHeaders(); mock.httpMethod = request.getHttpMethod(); byte[] bytes = ReadFromStream.readFromStream(1024, request.getInputStream()); mock.inputStream = new ByteArrayInputStream(bytes); return mock; }
public CompletionStage<Object> invokeDryRun(HttpRequest request, HttpResponse response, Object target) { request.setAttribute(ResourceMethodInvoker.class.getName(), this); incrementMethodCount(request.getHttpMethod()); ResteasyUriInfo uriInfo = (ResteasyUriInfo) request.getUri(); if (method.getPath() != null) { uriInfo.pushMatchedURI(uriInfo.getMatchingPath()); } uriInfo.pushCurrentResource(target); return invokeOnTargetDryRun(request, response, target); }