Arduino Connecting to URL

Hi, I have recently started to teach myself Arduino programming. I am aiming to build my own vehicle simulator for use with the game ‘Euro Truck Simulator’
To achieve this I need to get data from the game to gauges and lights etc, so I though an Arduino would be the best way to do this.
The game has an API that broadcasts game variables via a JSON file.

This API is accessed via an ethernet server.

I have used the code below to successfully connect to the server port, but I am not sure what to do now to get to the JSON file.

#include <Ethernet.h>
#include <SPI.h>

byte mac[] = { 0xBE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEC };
byte server[] = { 192, 168, 0, 13 }; // ETS2 Telemetry Server
int tcp_port = 25555;

EthernetClient client;

void setup()
{
  Ethernet.begin(mac);
  Serial.begin(9600);
  
  delay(1000);

  Serial.println("Connecting...");

  if (client.connect(server, tcp_port)) { // Connection to ETS2 telemetry Server
    Serial.println("Connected to ETS2 Telemetry Server");

  } else {
    Serial.println("connection failed");
  }
}

void loop()
{
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    for(;;)
      ;
  }
}

The full URL to get to the JSON data is: http://192,168.0.13:25555/api/ets2/telemetry

I have tried adding a GET command after connecting to the server but can’t seem to get the syntax right.

Hopefully someone can point me in right direction

aarontearle1:
Hopefully someone can point me in right direction

may be this will get you in the right direction... :grin:

Thank you. I am well aware of how to us Google and before joining this forum I did, but couldn’t find a solution that worked - hence why I came here to ask the “experts”