Http library used to make rest calls easily in c# projects
Install this library and follow the below steps
using System;
using request;
HttpProperties httpProperty = new HttpProperties()
{
dictObject = null,
methodType = "GET",
sync = true,
token = this.token.access_token, --optional
url =<request url>
};
object s = Http.HttpRequest(httpProperty);
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("xxKey",xxxxvalue);
dict.Add("xxKey",xxxxvalue);
HttpProperties httpProperty = new HttpProperties()
{
dictObject = dict,
methodType = "POST",
sync = true,
token = this.token.access_token, --optional
url =<request url>
};
object s = Http.HttpRequest(httpProperty);
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("xxKey",xxxxvalue);
dict.Add("xxKey",xxxxvalue);
HttpProperties httpProperty = new HttpProperties()
{
dictObject = dict,
methodType = "PUT",
sync = true,
token = this.token.access_token, --optional
url =<request url>
};
object s = Http.HttpRequest(httpProperty);
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("xxKey",xxxxvalue);
dict.Add("xxKey",xxxxvalue);
HttpProperties httpProperty = new HttpProperties()
{
dictObject = dict,
methodType = "DELETE",
sync = true,
token = this.token.access_token, --optional
url =<request url>
};
object s = Http.HttpRequest(httpProperty);