I'm setting a code in C # for a url shortener api to send in sms inside an application, everything is working, however the api outside of the code works, but inside the code oo return nothing comes back, I'm not much Experienced in C #, can anyone help me? Here is the code:
public static class Helpers
{
public static string EncurtadorUrl(string url)
{
try
{
string urlMigreMe = string.Format("http://tiny-url.info/api/v1/create?url={0}&apikey={APIKEY}chave_aqui&provider=bit_ly");
var client = new WebClient();
string response = client.DownloadString(urlMigreMe);
return response;
}
catch
{
return "";
}