Class HttpLoader

    • Constructor Detail

      • HttpLoader

        @Deprecated(since="1.0.3")
        public HttpLoader​(HttpClient httpClient)
        Deprecated.
        use HttpLoader(com.apicatalog.jsonld.http.HttpClient httpClient)
        Parameters:
        httpClient -
      • HttpLoader

        @Deprecated(since="1.0.3")
        public HttpLoader​(HttpClient httpClient,
                          int maxRedirections)
        Deprecated.
        use HttpLoader(com.apicatalog.jsonld.http.HttpClient httpClient, int maxRedirection)
        Parameters:
        httpClient -
        maxRedirections -
      • HttpLoader

        public HttpLoader​(HttpClient httpClient)
      • HttpLoader

        public HttpLoader​(HttpClient httpClient,
                          int maxRedirections)
    • Method Detail

      • defaultInstance

        public static final com.apicatalog.jsonld.loader.DefaultHttpLoader defaultInstance()
      • getAcceptHeader

        public static final String getAcceptHeader()
      • setFallbackContentType

        @Deprecated
        public void setFallbackContentType​(MediaType fallbackContentType)
        Deprecated.
        use DefaultHttpLoader#fallbackContentType(MediaType) Set fallback content-type used when received content-type is not supported. e.g. setFallbackContentType(MediaType.JSON_LD)
        Parameters:
        fallbackContentType - a content type that overrides unsupported received content-type
      • fallbackContentType

        public com.apicatalog.jsonld.loader.DefaultHttpLoader fallbackContentType​(MediaType fallbackContentType)
        Set fallback content-type used when received content-type is not supported. e.g. setFallbackContentType(MediaType.JSON_LD)
        Parameters:
        fallbackContentType - a content type that overrides unsupported received content-type
        Returns:
        DefaultHttpLoader instance
        Since:
        1.4.0
      • timeount

        public com.apicatalog.jsonld.loader.DefaultHttpLoader timeount​(Duration timeount)
        Set read timeout
        Parameters:
        timeount - to set or null for no timeout
        Returns:
        DefaultHttpLoader instance
        Since:
        1.4.0