Get Data from Localhost

I hope this is a simple one but I'm trying to get the value from http://localhost:8086/api/v2/datarefs/4927160704/value into my code but Im not sure if/how its done Im using a Leonardo board. There must be a simple way ??

Thanks Richard

The only Leonardo board I know of doesn't have internet capability built in (no Ethernet, no WiFi) so how exactly are you planning on getting the value?

This is exactly why im asking if it's a different board I need I will get one I only bought the Leonardo Because of the HID. if this is the case which board should I be looking at ?

Sorry, but I cannot help you further. You haven't provided anywhere near the level of detail about what it is you're trying to do that would be necessary to recommend a board.

im basically taking a value from a flight simulator to display on a 7 segment display I have it all working just can't get the data in

Reading between the lines...

You have an http endpoint and you need to issue a GET request for data. After receiving data from the endpoint you will parse it to extract the information you need and then display it on a seven segment display.

Sound correct? If so, then the next relevant question would be: is that endpoint served up over Ethernet or Wi-Fi? That will help determine which board you need.

That sounds exactly what I’m doing (well trying to do). i could do either but WiFi would probably be better

Then an ESP32 or a Raspberry Pi Pico W board would probably be a good choice.
Here's a tutorial on GET Arduino - HTTP Request | Arduino Tutorial

Thanks very much I will have a good look at that from first impressions it’s exactly what I’m trying to do

I might be missing something.

localhost is, as the name implies, local. No other device, whether that is an Arduino or other computer, can access that. It's only accessible from the system where it is running on.

Sorry yes you are correct I wasn’t sure if I could use localhost or not but it’s now evident from the reply’s I need to network the board

Its possible you could have a program running in the background on the computer itself, that sends the needed data over USB to the Arduino.

If this is for X-Planes, do a bit of google searching, no need to re-invent the wheel.

You are correct. To minimize the back-and-forth, i made the assumption that the hostname could be changed.

It is for Plane the problem im running into is im on Mac and everything I find needs a plugin that only runs on windows If there is a wheel please let me know as I really don't want to reinvent one