In your build cs (either plugin or project level depending where you wrote your code), you have to add a public dependency to “HTTP”,
Then that code should compile fine