Giter Club home page Giter Club logo

Comments (7)

deinok avatar deinok commented on May 27, 2024

you can use the CancellationToken. Are you asking for something like this? -> https://msdn.microsoft.com/es-es/library/system.net.http.httpclient.timeout(v=vs.110).aspx

from graphql-client.

asebak avatar asebak commented on May 27, 2024

@deinok how do you get access to the httpclient object, I cannot seem to find it in the api provided?

from graphql-client.

asebak avatar asebak commented on May 27, 2024

Noticed a pull-request was merged to support cancellationtokens, it was never released, any plans to release this, really need that feature.

from graphql-client.

deinok avatar deinok commented on May 27, 2024

from graphql-client.

graphdb2 avatar graphdb2 commented on May 27, 2024

how can we setup timeout on the http client ?

from graphql-client.

graphdb2 avatar graphdb2 commented on May 27, 2024

Sorry got it working with the latest code

 var httpClient = new HttpClient();
 httpClient.Timeout = new TimeSpan(0, 10, 0);
 var graphQLClient = httpClient.AsGraphQLClient(
 new GraphQLHttpClientOptions {EndPoint = new Uri(config.GraphQlURL)});

from graphql-client.

deinok avatar deinok commented on May 27, 2024

With this https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtokensource.cancelafter?view=netframework-4.7.2 you can also add timeouts per request insted of per client

from graphql-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.