Codota Logo
HttpClientResponse.headers
Code IndexAdd Codota to your IDE (free)

How to use
headers
method
in
io.vertx.reactivex.core.http.HttpClientResponse

Best Java code snippets using io.vertx.reactivex.core.http.HttpClientResponse.headers (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: io.knotx/knotx-core

private ClientResponse toResponse(Buffer buffer, final HttpClientResponse httpResponse, final RequestOptions httpRequestData) {
 final int statusCode = httpResponse.statusCode();
 if (HttpStatusClass.SUCCESS.contains(statusCode)) {
  LOGGER.debug("Repository 2xx response: {}, Headers[{}]", statusCode,
    DataObjectsUtil.toString(httpResponse.headers()));
 } else if (HttpStatusClass.REDIRECTION.contains(statusCode)) { // redirect
  LOGGER.info("Repository 3xx response: {}, Headers[{}]", statusCode,
    DataObjectsUtil.toString(httpResponse.headers()));
 } else if (HttpStatusClass.CLIENT_ERROR.contains(statusCode)) { // errors
  LOGGER.warn("Repository client error 4xx. Request URL: {}, response: {}, Headers[{}]",
    getUrl(httpRequestData), statusCode, DataObjectsUtil.toString(httpResponse.headers()));
 } else if (HttpStatusClass.SERVER_ERROR.contains(statusCode)) {
  LOGGER.error("Repository server error 5xx. Request URL: {},  response: {}, Headers[{}]",
    getUrl(httpRequestData), statusCode, DataObjectsUtil.toString(httpResponse.headers()));
 } else {
  LOGGER.warn("Other response: {}, Headers[{}]", statusCode,
    DataObjectsUtil.toString(httpResponse.headers()));
 }
 return new ClientResponse()
   .setStatusCode(statusCode)
   .setHeaders(httpResponse.headers())
   .setBody(buffer.getDelegate());
}
origin: Cognifide/knotx

private ClientResponse toResponse(Buffer buffer, final HttpClientResponse httpResponse, final RequestOptions httpRequestData) {
 final int statusCode = httpResponse.statusCode();
 if (HttpStatusClass.SUCCESS.contains(statusCode)) {
  LOGGER.debug("Repository 2xx response: {}, Headers[{}]", statusCode,
    DataObjectsUtil.toString(httpResponse.headers()));
 } else if (HttpStatusClass.REDIRECTION.contains(statusCode)) { // redirect
  LOGGER.info("Repository 3xx response: {}, Headers[{}]", statusCode,
    DataObjectsUtil.toString(httpResponse.headers()));
 } else if (HttpStatusClass.CLIENT_ERROR.contains(statusCode)) { // errors
  LOGGER.warn("Repository client error 4xx. Request URL: {}, response: {}, Headers[{}]",
    getUrl(httpRequestData), statusCode, DataObjectsUtil.toString(httpResponse.headers()));
 } else if (HttpStatusClass.SERVER_ERROR.contains(statusCode)) {
  LOGGER.error("Repository server error 5xx. Request URL: {},  response: {}, Headers[{}]",
    getUrl(httpRequestData), statusCode, DataObjectsUtil.toString(httpResponse.headers()));
 } else {
  LOGGER.warn("Other response: {}, Headers[{}]", statusCode,
    DataObjectsUtil.toString(httpResponse.headers()));
 }
 return new ClientResponse()
   .setStatusCode(statusCode)
   .setHeaders(httpResponse.headers())
   .setBody(buffer.getDelegate());
}
io.vertx.reactivex.core.httpHttpClientResponseheaders

Popular methods of HttpClientResponse

  • statusCode
  • toObservable
  • bodyHandler
  • getHeader
  • handler
  • toFlowable

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now