1
votes

I have this curl request which I've been able to cobble together from various tutorials, and it works, but I need to be able to do it in C#.

curl -k -d "code=4/blahBLMUeFewxYi7AblahgdBf_7Lm.IrGYEyuzz8QfOl05ti8ZT3bppze2bgI&client_id=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com&client_secret=blahjf5z45yLNIjXGSO&redirect_uri=http://localhost&grant_type=authorization_code" https://accounts.google.com/o/oauth2/token

I have no code to look at, as I have no idea where to start.

Does anyone have any tutorial on how to do just this?

Thanks.

1
Personally, I'd use "System.Diagnostics.Process" and simply exec a copy of curl...paulsm4
This will be running on a shared host. It won't have curl.Sam Delaney

1 Answers

0
votes

Have you been using the WebRequest class so far? That would seem to be a sensible place to start.

If you're looking to do OAuth integration, there are client libraries for that.