Communication between ESP8266 and arduino Leonardo

Hi, I connected ESP8266 with arduino Leonardo. ESP takes data from my website and it works and I want to send it to my arduino (RX TX) and it works but not correct. ESP can get only data "off" or "on" but on my monitor serial i see

O
O

O
N

O
N

O
N

O
N

O
N

O
N

O
N

O
N

O
N

O
O

O
N

My code for arduino

char nowStatus;

char prevStatus;

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11);

void setup() {

  pinMode(0, OUTPUT);

  Serial.begin(115200);
  
  while (!Serial) {}

  Serial.println("Goodnight moon!");

  mySerial.begin(115200);
  
  mySerial.println("Hello, world?");
}

void loop() { 
  
  if (mySerial.available()) {

    char input = mySerial.read();

    Serial.println(input);       
    
  }
  
}

AND MY CODE FOR ESP

#include <ESP8266WiFi.h>

#include <WiFiClient.h> 

#include <ESP8266WebServer.h>

#include <ESP8266HTTPClient.h>

const char* ssid = "xxx";

const char* password = "xxx";
 
ESP8266WebServer server(80);   

void setup(void){
  
  Serial.begin(115200);
  
  WiFi.begin(ssid, password); 
  
  while (WiFi.status() != WL_CONNECTED) {
    
    delay(500);
        
  }
  
}
 
void loop(void){

  HTTPClient http;    //Declare object of class HTTPClient
 
  String getData, Link;
 
  getData = "?status=current";
  
  Link = "http://www.example.pl/test.php" + getData;
  
  http.begin(Link);     //Specify request destination
  
  int httpCode = http.GET();            //Send the request
  
  String payload = http.getString();    //Get the response payload
   
  Serial.println(payload);    //Print request response payload
 
  http.end();  //Close connection

  delay(500); 
  
}

Serial.begin(115200) the same for arduino and ESP. Are you able to tell me where is the problem?

First: Always use code tags to post code! Please edit your post and insert code tags.

 mySerial.begin(115200);

SoftwareSerial won't run on 115200 baud. It's not necessary as the Leonardo has a hardware serial interface on pins 0 and 1 available using the Serial1 object. Use that instead of a serial emulation.

I changed begin values and it works now without "errors". One more question (I hope last one). I want to make statement

if(answer == "OFF") {

} else if(answer == "ON") {

}

Just tell me please - what to put instead of "answer"?

Just tell me please - what to put instead of "answer"?

I don't know as that depends on what the code is expected to do and surrounding code exists.