I would recommend looking into using CSOM to query the Project Online database rather than the HttpClient. It's a NuGet package you can add to your project.
Check out that link and the surrounding topics.