Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

385
Views
RestClient no está esperando la respuesta de API o, a veces, está dando la respuesta y, a veces, no.

He implementado un código de aprendizaje automático de python usando fastapi, pero a veces me da la respuesta y otras veces no. Cómo obligarlo a esperar la respuesta de la API cada vez. Por favor ayúdenme estoy teniendo dificultades con esto.

 var client = new RestClient("http://127.0.0.1:8000/predictbuy"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); var param = new GannJson1{ Diff_Step=V1_SStep, Last_Swing_Bars=V2_SSwing, H1= V3_SH1, L1=V4_SL1, O1=V5_SO1, C1=V6_SC1, V1=V7_SV1, HiLo1=V8_SHiLo1, H2=V9_SH2, L2=V10_SL2, O2=V11_SO2, C2=V12_SC2, V2=V13_SV2, HiLo2=V14_SHiLo2, H3=V15_SH3, L3=V16_SL3, O3=V17_SO3, C3=V18_SC3, V3=V19_SV3, HiLo3=V20_SHiLo3 }; request.AddJsonBody(param); var response1 = client.Execute(request); char pred1=(response1.Content)[1];
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Por favor, compruebe esta función:

 public async void Function() { var client = new RestClient(); var request = new RestRequest("http://www.google.com"); var cancellationTokenSource = new CancellationTokenSource(); var restResponse = await client.ExecuteAsync(request, cancellationTokenSource.Token); var result = restResponse.Content; }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!