Last active
October 1, 2022 13:36
-
-
Save GitHub30/a0be46a0c205435d1b0b91451d5b1617 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$listener = new-object Net.HttpListener | |
# curl localhost/Temporary_Listen_Addresses | |
$listener.Prefixes.Add("http://+:80/Temporary_Listen_Addresses/") | |
#$listener.Prefixes.Add("http://localhost:8888/") | |
$listener.Start() | |
while ($true) | |
{ | |
$context = $listener.GetContext() | |
echo $context.Request | |
$context.Response.OutputStream.Close() | |
} | |
$listener.Stop() | |
$listener.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment