C#C
C#4y ago
Metalkon

HttpClient only working in Main but not in another Class? [Answered]

I'm currently following a c# json tutorial and trying to put this code into it's own class so I can keep multiple code references in a single project. Everything works fine in Main but when I try to put it into another class it won't work properly, anyone have an idea on what I might be missing?

When I run it in main I get the json details printed in the console window, but when i run it in the class it's blank.

The only thing in the main method is JsonServer.Run();
unknown.png
Was this page helpful?