Arduino HTTPClient passing string to variable For some reason I can't seem to pass a simple string from one variable to another. Below is my code:

  HTTPClient http; // Declare an object of class HTTPClient
  http.begin(address); // Specify request destination
  int httpCode = http.GET(); // Send the request

  Serial.println("String: " + http.getString());

  String prp = http.getString();
  Serial.println("temp string: " + prp);


It prints out:


  String: &lt; ! DOCTYPE HTML> 
  26
  
  temp string:


Why doesnt my string get correctly passed on to my temporary string variable? 

Tom
The getString() method calls writeToStream which is documented write all  message body / payload to Stream. It writes all the data of the http response to he output and doesn't store them internally. The next call has nothing to read because the first call to getString() put everything out.