Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HTTP Client fails when instantiated locally rather than globally #156

Open
Assignees
Rocketct
Labels
topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project
@tigoe

Description

@tigoe

When you put the instantiation of the ArduinoHttpClient in the loop or in any function, the client often fails to finish the request. It will make the HTTP call, and the server will acknowledge it, but then nothing happens until timeout.

Tested on Nano RP2040 (for WiFiNINA) and Uno R4 WiFi.

It fails for both HTTP and HTTPS, using the steps below:

To reproduce this, using Examples -> SimpleGet:

  1. change line 12 to #include the correct library for your board (WiFiNINA.h, WiFiS3.h, etc)
  2. changeserverAddress (line 21) to "www.arduino.cc" or any test server
  3. changeport (line 22) to 80
  4. EnterSECRET_SSID andSECRET_PASS inarduino_secrets.h for your network
  5. Move line 25,HttpClient client = etc. to the first line of theloop() function (line 49)
  6. Upload and watch the results. It will fail at line 50, "Making GET request". It will succeed about 25% of the time, but it will fail in a significant number of cases.

To test HTTPS, changeWiFiClient instantiation on line 24 toWiFiSSLClient, and changeport to 443.

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp