All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.httpclient.HttpResponse.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






HttpResponse (org.spincast:spincast-framework 1.0.0 API)












org.spincast.plugins.httpclient

Interface HttpResponse

    • Method Detail

      • getStatus

        int getStatus()
        Gets the HTTP status.
      • getContentType

        String getContentType()
        Gets the Content-Type.
      • getHeader

        List<String> getHeader(String name)
        Gets an header. An header can have more than one value.
      • getHeaderFirst

        String getHeaderFirst(String name)
        Gets the first value of an header.
      • getCookieValue

        String getCookieValue(String name)
        Gets the value of a cookie.
        Returns:
        the value of the cookie or null if the cookie doesn't exist.
      • isGzipped

        boolean isGzipped()
        Is the response gzipped?
      • getContentAsString

        String getContentAsString()
        Gets the content as a UTF-8 String.
      • getContentAsString

        String getContentAsString(String encoding)
        Gets the content as a String using the specified encoding.
      • getContentAsJsonObject

        JsonObject getContentAsJsonObject()
        Gets the content as a JsonObject. This expects the content to be a valid Json string or an exception is thrown.
      • getContentAsByteArray

        byte[] getContentAsByteArray()
        Get the content as byte[].

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy