Http.begin get data

I'm having trouble retrieving data from the URL. What should I use? http.getString() will not print anything and http.getStream() will only list the number 1. At the same time, I have JSON data at the URL.

          HTTPClient http;   
          StaticJsonDocument<200> doc;
          int httpResponseCode = http.GET();
          if(httpResponseCode > 0){
            DeserializationError error = deserializeJson(doc, http.getStream());
            if (error) {
              Serial.print("JSON error: ");

only response code 200 is success.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.