Skip to content

Conversation

@cataggar
Copy link

I've been attempting to make an HTTP request, but have been unsuccessful. I create this branch with my attempt. To reproduce, checkout my branch and run pwsh samples\calculator\run.ps1.

123 + 456 = 579
HELLO, WORLD!
GetRepo JSON:
{"error":"timeout","elapsedMs":5059}

It feels like the HTTP call is never actually executing.

}
break;
}
System.Threading.Thread.Sleep(delay);
Copy link

@SingleAccretion SingleAccretion Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need to poll the response (future.Subscribe + Poll) instead of simply waiting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsturtevant posted this sample in #98 that uses PollWasiEventLoopUntilResolved. It also appears that HttpClient API can be used. That would be amazing. Going to try out https://github.com/jsturtevant/csharp-components-demos/blob/main/console/Program.cs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, If you are doing outbound http HttpClient should work!

@cataggar cataggar closed this Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants