Find solution

How to call a GOOGLE API in C#?

Here are 18 best answers to ‘How to call a GOOGLE API in C#?’ - the most relevant comments and solutions are submitted by users of Stack Overflow, Quora and Yahoo! Answers.

Best solution

  • calling google Url Shortner API in C#

    I want to call the google url shortner API from my C# Console Application, the request I try to implement is: POST https://www.googleapis.com/urlshortener/v1/url Content-Type: application/json {"longUrl": "http://www.google.com/"} When I try to use this code: using System.Net; using System.Net.Http; using System.IO; and the main method is: static void Main(string[] args) { string s = "http://www.google.com/"; var client = new HttpClient(); // Create the HttpContent...

    Answer:

    you can check the code below (made use of System.Net). You should notice that the contenttype must be...

    Mark as irrelevant Undo

Other solutions