Visitar URL original
Need a way to specify timeout for http connection which fetches external jsonld schema · Issue #268 · jsonld-java/jsonld-java · GitHub
Skip to content

Need a way to specify timeout for http connection which fetches external jsonld schema #268

Open

Description

@voiddrum

As a result of debugging issue reported in #267 I faced another issue with the code taking considerable amount of time before it times-out the external connection. Need a way to specify the timeout setting to the external connection so that the code can fail fast if the developer wants it to.

Activity

  1. ansell commented on Nov 27, 2019

    @ansell
    Member

    The way to do this is to customise the DocumentLoader and/or the internal HttpClient instance. This is practically done by customising the JsonLdOptions object that you are using in this particular case with JsonLdOptions.setDocumentLoader, or JsonLdOptions.getDocumentLoader().setHttpClient():

    https://github.com/jsonld-java/jsonld-java/blob/master/core/src/main/java/com/github/jsonldjava/core/JsonLdOptions.java#L289

    https://github.com/jsonld-java/jsonld-java/blob/master/core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java#L107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions