Skip to content

Instantly share code, notes, and snippets.

@guibranco
Created February 7, 2019 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guibranco/75c022ec34b35a4834283d43693e47dc to your computer and use it in GitHub Desktop.
Save guibranco/75c022ec34b35a4834283d43693e47dc to your computer and use it in GitHub Desktop.
RestSharp (C#) implementation of https://www.latlong.net/_spm4.php
var address = WebUtility.UrlEncode("Alameda Rio Negro, 585 Barueri SP BR");
var client = new RestClient("https://www.latlong.net/_spm4.php");
var request = new RestRequest(Method.POST);
request.AddHeader("x-requested-with", "XMLHttpRequest");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("undefined", "c1=" + address + "&action=gcpm&cp=", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment