bchavez / Coinbase.Commerce

:moneybag: A .NET/C# implementation of the Coinbase Commerce API.
https://commerce.coinbase.com/docs/
Other
48 stars 9 forks source link

HttpContext does not contain a definition of InputStream. ASP.NET core webhook #6

Closed chuksgpfr closed 5 years ago

chuksgpfr commented 5 years ago

var requestSignature = Request.Headers[HeaderNames.WebhookSignature]; Request.InputStream.Seek(0, SeekOrigin.Begin); var json = new StreamReader(Request.InputStream).ReadToEnd();

HttpContext does not contain a definition of InputStream.

How to solve this

bchavez commented 5 years ago

@chuksgpfr , you'll have to find where the input stream is for the request body in your version of ASP.NET. MVC5 or ASP.NET Core. The HttpContext and input stream locations are slightly different between versions. You'll have to give more information about what web framework you're using.

Hope that helps, Brian