Examples of contentType()


Examples of com.jetdrone.vertx.yoke.Engine.contentType()

                    @Override
                    public void handle(AsyncResult<Buffer> asyncResult) {
                        if (asyncResult.failed()) {
                            next.handle(asyncResult.cause());
                        } else {
                            setContentType(renderEngine.contentType(), renderEngine.contentEncoding());
                            end(asyncResult.result());
                        }
                    }
                });
            }
View Full Code Here

Examples of com.khs.sherpa.annotation.Action.contentType()

    this.hasPermission(method, userid, token);
    Action annotation = method.getAnnotation(Action.class);
    if (annotation == null) {
      throw new SherpaRuntimeException("Error executing"+target+" @Action annotation required for not endpoint methods"  );
    }
    if(annotation.contentType() != null) {
      response.setContentType(method.getAnnotation(Action.class).contentType().type);
    }
    return this.invokeMethod(target, method)
  }
 
View Full Code Here

Examples of com.s3auth.hosts.Resource.contentType()

            }
        }
        if (request.headers().containsKey(HttpHeaders.ACCEPT_ENCODING)
            && request.headers().get(HttpHeaders.ACCEPT_ENCODING)
                .contains("gzip")
            && HttpThread.COMPRESSIBLE.contains(resource.contentType())) {
            resource = new GzipResource(resource);
        }
        return resource;
    }
View Full Code Here

Examples of er.ajax.AjaxUploadProgress.contentType()

        NSData data = new NSData(progress.tempFile().toURI().toURL());
        setValueForBinding(data, "data");
      }
     
      if (hasBinding("mimeType")) {
        String contentType = progress.contentType();
        if (contentType != null) {
          setValueForBinding(contentType, "mimeType");
        }
      }
View Full Code Here

Examples of jodd.http.HttpResponse.contentType()

  @Test
  public void testRawResult() {
    HttpResponse httpResponse = HttpRequest.get("localhost:8173/madvocRawImage").send();
    assertEquals(200, httpResponse.statusCode());
    assertEquals("image/gif", httpResponse.contentType());
    byte[] bytes = httpResponse.bodyBytes();
    assertArrayEquals(RawResultAction.SMALLEST_GIF, bytes);
  }

  // ---------------------------------------------------------------- text
View Full Code Here

Examples of ninja.Result.contentType()

    @Test
    public void testRenderPlainStringLeavesExplicitlySetContentTypeUntouched() {
        final String toRender = "this is just a plain string";
        final String contentType = "any/contenttype";
        Result result = Results.ok();
        result.contentType(contentType);
        result.renderRaw(toRender);
        resultHandler.handleResult(result, context);
        assertEquals(contentType, result.getContentType());
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.annotation.BodyContentDescription.contentType()

    }
    BodyContent bodyContent = annotationTag.bodyContent();
    BodyContentDescription contentDescription = decl.getAnnotation(BodyContentDescription.class);
    // TODO more error checking
    if (contentDescription != null) {
      if (bodyContent.equals(BodyContent.JSP) && contentDescription.contentType().length() > 0) {
        throw new IllegalArgumentException(
            "contentType " + contentDescription.contentType() + " for bodyContent JSP not allowed!");
      } else if (bodyContent.equals(BodyContent.TAGDEPENDENT) && contentDescription.contentType().length() == 0) {
        throw new IllegalArgumentException("contentType should set for tagdependent bodyContent");
      }
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.annotation.BodyContentDescription.contentType()

    BodyContentDescription contentDescription = decl.getAnnotation(BodyContentDescription.class);
    // TODO more error checking
    if (contentDescription != null) {
      if (bodyContent.equals(BodyContent.JSP) && contentDescription.contentType().length() > 0) {
        throw new IllegalArgumentException(
            "contentType " + contentDescription.contentType() + " for bodyContent JSP not allowed!");
      } else if (bodyContent.equals(BodyContent.TAGDEPENDENT) && contentDescription.contentType().length() == 0) {
        throw new IllegalArgumentException("contentType should set for tagdependent bodyContent");
      }
    }
    addLeafTextElement(bodyContent.toString(), "body-content", tagElement, document);
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.annotation.BodyContentDescription.contentType()

    // TODO more error checking
    if (contentDescription != null) {
      if (bodyContent.equals(BodyContent.JSP) && contentDescription.contentType().length() > 0) {
        throw new IllegalArgumentException(
            "contentType " + contentDescription.contentType() + " for bodyContent JSP not allowed!");
      } else if (bodyContent.equals(BodyContent.TAGDEPENDENT) && contentDescription.contentType().length() == 0) {
        throw new IllegalArgumentException("contentType should set for tagdependent bodyContent");
      }
    }
    addLeafTextElement(bodyContent.toString(), "body-content", tagElement, document);
    return tagElement;
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.annotation.BodyContentDescription.contentType()

    }
    BodyContent bodyContent = annotationTag.bodyContent();
    BodyContentDescription contentDescription = decl.getAnnotation(BodyContentDescription.class);
    // TODO more error checking
    if (contentDescription != null) {
      if (bodyContent.equals(BodyContent.JSP) && contentDescription.contentType().length() > 0) {
        throw new IllegalArgumentException(
            "contentType " + contentDescription.contentType() + " for bodyContent JSP not allowed!");
      } else if (bodyContent.equals(BodyContent.TAGDEPENDENT) && contentDescription.contentType().length() == 0) {
        throw new IllegalArgumentException("contentType should set for tagdependent bodyContent");
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.