Ardunio ethernet shield

I have Arduino mega and shield, I am sending data to the asp.net mvc project from these Arduino digital pins and I am researching a faster method. I will give you a sample code, can you help me?

int ArduinoJobHistory()
{
int maxRetryCount = 10; // We will repeat the API call a maximum of 3 times
int retryCount = 0;
while (retryCount < maxRetryCount) { // while
String postRequest = "GET /home/ArduinoJobHistory?jobOrderFK=" + jobOrderFK +"&&IpAddress="+post_IpAddress+" HTTP/1.1\r\n" +
"Host: yagmur.autobot.com.tr\r\n" +
"Connection: close\r\n" +
"\r\n";

 if (client.connect(server, 80)) {
 
  client.print(postRequest);
 while (client.connected()) {
   if (client.available()) {
     jobOrderHistory = client.readStringUntil('\n');
   }
 }
 client.stop();


   return jobOrderHistory.toInt();

}
else {

   // API call failed, let's wait 5 seconds to try again

   retryCount++;
 }
     } // while

return jobOrderHistory.toInt();
}

Hello, welcome to the Arduino Forum

do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation for your ask).

I moved your topic to an appropriate forum category @ilkeryyildiz.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

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