diff --git a/CoverMyDotNet.Samples/Program.cs b/CoverMyDotNet.Samples/Program.cs index 98707af..ddc264d 100755 --- a/CoverMyDotNet.Samples/Program.cs +++ b/CoverMyDotNet.Samples/Program.cs @@ -57,16 +57,48 @@ public static void MultipleRequests(Client client) var requests = client.GetRequests(tokens.ToArray()); foreach(var v in requests.Requests) { - Console.WriteLine("Patient: {0} {1}", v.Patient.FirstName, v.Patient.LastName); + Console.WriteLine("Token: {0} {1}", v.Id, v.Tokens.First().Id); } } + + public static void DrugSearch(Client client) + { + var drugResults = client.SearchDrugs("ambien"); + Console.WriteLine(drugResults.Drugs.Count.ToString() + " Results"); + foreach(var v in drugResults.Drugs) + Console.WriteLine(v.FullName + " " + v.Id); + } + + public static void GetDrug(Client client) + { + var drug = client.GetDrug("018058"); + Console.WriteLine(drug.FullName + " comes in the form of " + drug.DosageForm); + } + + public static void GetForm(Client client) + { + var form = client.GetForm("medco_general_pa_form_21039"); + Console.WriteLine(form.Id + " " + form.Description); + } + + public static void SearchForms(Client client) + { + var forms = client.SearchForms("064691", "OH", "bcbs"); + Console.WriteLine(forms.Forms.Count + " Results"); + Console.WriteLine("First form has a score of " + forms.Forms.First().Score); + } + public static void Main (string[] args) { string apiId = ConfigurationManager.AppSettings ["ApiId"]; string secret = ConfigurationManager.AppSettings ["Secret"]; string host = ConfigurationManager.AppSettings ["Host"]; var client = new Client (apiId, secret); - MultipleRequests(client); + //MultipleRequests(client); + DrugSearch(client); + GetDrug(client); + GetForm(client); + SearchForms(client); } } } diff --git a/CoverMyDotNet.Tests/ClientTests.cs b/CoverMyDotNet.Tests/ClientTests.cs index 4e334f6..0c78984 100755 --- a/CoverMyDotNet.Tests/ClientTests.cs +++ b/CoverMyDotNet.Tests/ClientTests.cs @@ -183,6 +183,7 @@ public void Should_Client_Get_Requests_Return_Multiple() Assert.AreEqual(resp.Requests.Count, 5); } } + [Test] public void Should_Client_Delete_Post_Correct_Data() { string id = Guid.NewGuid().ToString(); @@ -190,7 +191,7 @@ public void Should_Client_Delete_Post_Correct_Data() string requestContent = ""; var requestHandlers = new List() { - new MockHttpHandler("/requests/", "DELETE", (req, rsp, prm) => + new MockHttpHandler("/requests/" + id, "DELETE", (req, rsp, prm) => { requestContent = req.Content(); }) @@ -204,6 +205,233 @@ public void Should_Client_Delete_Post_Correct_Data() Assert.GreaterOrEqual(requestContent.IndexOf("Steve"), 0); } } - } -} + [Test] + public void Should_Client_Search_Drug_Use_Correct_Data() + { + string drug_name = Guid.NewGuid().ToString(); + Dictionary requestContent = new Dictionary(); + var requestHandlers = new List() + { + new MockHttpHandler("/drugs", "GET", (req, rsp, prm) => + { + requestContent = prm; + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers)) + { + _client.SearchDrugs(drug_name); + Assert.That(requestContent.Any(p => p.Key == "q")); + Assert.That(requestContent.Any(p => p.Value == drug_name)); + } + } + + [Test] + public void Should_Client_Search_Drug_Parse_Data() + { + string drug_name = Guid.NewGuid().ToString(); + Dictionary requestContent = new Dictionary(); + var requestHandlers = new List() + { + new MockHttpHandler("/drugs", "GET", (req, rsp, prm) => + { + return File.ReadAllText("Fixtures/Drugs.json"); + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm) => rsp.Header("Content-Type", "application/json"))) + { + var drugs = _client.SearchDrugs(drug_name); + Assert.AreEqual(drugs.Drugs.Count, 3); + Assert.AreEqual(drugs.Drugs.First().FullName, "Boniva 150MG tablets"); + Assert.AreEqual(drugs.Drugs.First().Strength, "150"); + Assert.AreEqual(drugs.Drugs[1].Href, "https://staging.api.covermymeds.com/drugs/094563"); + Assert.AreEqual(drugs.Drugs[2].GPI, "30042048102030"); + } + } + + + [Test] + public void Should_Client_Get_Drug_Use_Correct_Data() + { + string drug_id = Guid.NewGuid().ToString(); + bool called = false; + var requestHandlers = new List() + { + new MockHttpHandler(string.Format("/drugs/{0}", drug_id), "GET", (req, rsp, prm) => + { + called = true; + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers)) + { + _client.GetDrug(drug_id); + Assert.That(called); + } + } + + [Test] + public void Should_Client_Get_Form_Parse_Data() + { + string form_id = Guid.NewGuid().ToString(); + var requestHandlers = new List() + { + new MockHttpHandler(string.Format("/forms/{0}", form_id), "GET", (req, rsp, prm) => + { + return File.ReadAllText("Fixtures/Form.json"); + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm)=> rsp.Header("Content-Type", "application/json"))) + { + var form = _client.GetForm(form_id); + Assert.AreEqual(form.Id, 4); + Assert.AreEqual(form.Name, "humana_tracleer"); + Assert.AreEqual(form.IsEPA, false); + Assert.AreEqual(form.ContactFax, "(877) 486-2621"); + } + } + + [Test] + public void Should_Client_Get_Form_Use_Correct_URL() + { + string form_id = Guid.NewGuid().ToString(); + bool called = false; + var requestHandlers = new List() + { + new MockHttpHandler(string.Format("/forms/{0}", form_id), "GET", (req, rsp, prm) => + { + called = true; + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm) => rsp.Header("Content-Type", "application/json"))) + { + _client.GetForm(form_id); + Assert.That(called); + } + } + + [Test] + public void Should_Client_Search_Forms_Parse_Data() + { + var requestHandlers = new List() + { + new MockHttpHandler("/forms/", "GET", (req, rsp, prm) => + { + return File.ReadAllText("Fixtures/Forms.Json"); + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm) => rsp.Header("Content-Type", "application/json"))) + { + var forms = _client.SearchForms("1234", "OH", "12345"); + Assert.AreEqual(forms.Forms.Count, 5); + Assert.AreEqual(forms.Forms.First().Id, 15257); + Assert.AreEqual(forms.Forms[2].Name, "express_scripts_medicare_part_d_quantity_limit_exceptions"); + Assert.AreEqual(forms.Forms[1].Directions, "Prior Authorization of Benefits (PAB) Form for Multi-Source Brand Medications"); + Assert.AreEqual(forms.Forms.Last().RequestFormId, "anthem_general_3876"); + } + } + + [Test] + public void Should_Client_Search_Forms_Use_Correct_Data() + { + var requestContent = new Dictionary(); + var requestHandlers = new List() + { + new MockHttpHandler("/forms", "GET", (req, rsp, prm) => + { + requestContent = prm; + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm) => rsp.Header("Content-Type", "application/json"))) + { + _client.SearchForms("1234", "OH", "12345"); + Assert.AreEqual(requestContent["drug_id"], "1234"); + Assert.AreEqual(requestContent["state"], "OH"); + Assert.AreEqual(requestContent["q"], "12345"); + } + } + + [Test] + public void Should_Client_Search_Forms_Use_Correct_Data2() + { + var requestContent = new Dictionary(); + var requestHandlers = new List() + { + new MockHttpHandler("/forms", "GET", (req, rsp, prm) => + { + requestContent = prm; + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm) => rsp.Header("Content-Type", "application/json"))) + { + _client.SearchForms("1234", "OH", "30", "binsample", "223142", "group-567"); + Assert.AreEqual(requestContent["drug_id"], "1234"); + Assert.AreEqual(requestContent["state"], "OH"); + Assert.AreEqual(requestContent["threshold"], "30"); + Assert.AreEqual(requestContent["bin"], "binsample"); + Assert.AreEqual(requestContent["pcn"], "223142"); + Assert.AreEqual(requestContent["group_id"], "group-567"); + } + } + + [Test] + public void Should_Client_Post_Tokens() + { + var tokenIds = new List(); + string requestContent = ""; + for(int i = 0;i<5;i++) + tokenIds.Add(Guid.NewGuid().ToString()); + var requestHandlers = new List() + { + new MockHttpHandler("/requests/tokens", "POST", (req, rsp, prm) => + { + requestContent = req.Content(); + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers)) + { + _client.PostTokens(tokenIds.ToArray()); + for(int i = 0;i<5;i++) + Assert.GreaterOrEqual(requestContent.IndexOf(tokenIds[i]), 0); + } + } + + [Test] + public void Should_Client_Parse_Token_Data() + { + var requestHandlers = new List() + { + new MockHttpHandler("/requests/tokens", "POST", (req, rsp, prm) => + { + return File.ReadAllText("Fixtures/PostToken.json"); + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers, (req, rsp, prm) => rsp.Header("Content-Type", "application/json"))) + { + var resp = _client.PostTokens(new string []{"blah", "test", "Test2"}); + Assert.AreEqual(resp.Tokens.Count, 1); + Assert.AreEqual(resp.Tokens.First().Id, "nhe44fu4g22upqqgstea"); + Assert.AreEqual(resp.Tokens.First().RequestId, "NT4HJ4"); + + } + } + + [Test] + public void Should_Client_Delete_Token() + { + string _tokenId = Guid.NewGuid().ToString(); + bool called = false; + var requestHandlers = new List() + { + new MockHttpHandler("/requests/tokens/" + _tokenId, "DELETE", (req, rsp, prm) => + { + called = true; + }) + }; + using(new MockServer(DEFAULT_MOCK_PORT, requestHandlers)) + { + _client.DeleteToken(_tokenId); + Assert.That(called); + } + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet.Tests/GetDrugTests.cs b/CoverMyDotNet.Tests/GetDrugTests.cs new file mode 100644 index 0000000..a684389 --- /dev/null +++ b/CoverMyDotNet.Tests/GetDrugTests.cs @@ -0,0 +1,58 @@ +using System.Net.Http; +using System; +using NUnit.Framework; +using Moq; +using RestSharp; +using System.Linq; +using CoverMyDotNet.Requests; + +namespace CoverMyDotNet.Tests +{ + [TestFixture] + public class GetDrugTests + { + private string _apiId; + private string _drugId; + private GetDrug _getDrug; + + [SetUp] + public void Setup() + { + _apiId = Guid.NewGuid().ToString(); + _drugId = Guid.NewGuid().ToString(); + _getDrug = new GetDrug(_apiId, _drugId); + } + + [Test] + public void Should_Use_Correct_Method() + { + Assert.AreEqual(_getDrug.Method, Method.GET); + } + + [Test] + public void Should_Use_Correct_Resource() + { + Assert.AreEqual(_getDrug.Resource, string.Format("drugs/{0}", _drugId)); + } + + [Test] + public void Should_Use_Correct_RootElement() + { + Assert.AreEqual(_getDrug.RootElement, "drug"); + } + + [Test] + public void Should_Have_Version_Parameter() + { + Assert.That(_getDrug.Parameters.Any(p => p.Name == "v" && p.Value.ToString() == "1")); + } + + [Test] + public void Should_Have_Authorization_Parameter() + { + Assert.That(_getDrug.Parameters.Any(p => p.Name == "Authorization" && + p.Value.ToString() == string.Format("Bearer {0}+x-no-pass", _apiId))); + } + + } +} \ No newline at end of file diff --git a/CoverMyDotNet.Tests/GetFormTests.cs b/CoverMyDotNet.Tests/GetFormTests.cs new file mode 100644 index 0000000..4981d5c --- /dev/null +++ b/CoverMyDotNet.Tests/GetFormTests.cs @@ -0,0 +1,58 @@ +using System.Net.Http; +using System; +using NUnit.Framework; +using Moq; +using RestSharp; +using System.Linq; +using CoverMyDotNet.Requests; + +namespace CoverMyDotNet.Tests +{ + [TestFixture] + public class GetFormTests + { + private string _apiId; + private string _formId; + private GetForm _getForm; + + [SetUp] + public void Setup() + { + _apiId = Guid.NewGuid().ToString(); + _formId = Guid.NewGuid().ToString(); + _getForm = new GetForm(_apiId, _formId); + } + + [Test] + public void Should_Use_Correct_Method() + { + Assert.AreEqual(_getForm.Method, Method.GET); + } + + [Test] + public void Should_Use_Correct_Resource() + { + Assert.AreEqual(_getForm.Resource, string.Format("forms/{0}", _formId)); + } + + [Test] + public void Should_Use_Correct_RootElement() + { + Assert.AreEqual(_getForm.RootElement, "form"); + } + + [Test] + public void Should_Have_Version_Parameter() + { + Assert.That(_getForm.Parameters.Any(p => p.Name == "v" && p.Value.ToString() == "1")); + } + + [Test] + public void Should_Have_Authorization_Parameter() + { + Assert.That(_getForm.Parameters.Any(p => p.Name == "Authorization" && + p.Value.ToString() == string.Format("Bearer {0}+x-no-pass", _apiId))); + } + + } +} \ No newline at end of file diff --git a/CoverMyDotNet.Tests/SearchDrugTests.cs b/CoverMyDotNet.Tests/SearchDrugTests.cs new file mode 100644 index 0000000..54a8928 --- /dev/null +++ b/CoverMyDotNet.Tests/SearchDrugTests.cs @@ -0,0 +1,64 @@ +using System.Net.Http; +using System; +using NUnit.Framework; +using Moq; +using RestSharp; +using System.Linq; +using CoverMyDotNet.Requests; + +namespace CoverMyDotNet.Tests +{ + [TestFixture] + public class SearchDrugTests + { + private string _apiId; + private string _query; + private SearchDrugs _searchDrug; + + [SetUp] + public void Setup() + { + _apiId = Guid.NewGuid().ToString(); + _query = Guid.NewGuid().ToString(); + _searchDrug = new SearchDrugs(_apiId, _query); + } + + [Test] + public void Should_Use_Correct_Method() + { + Assert.AreEqual(_searchDrug.Method, Method.GET); + } + + [Test] + public void Should_Use_Correct_Resource() + { + Assert.AreEqual(_searchDrug.Resource, "drugs"); + } + + [Test] + public void Should_Use_Correct_RootElement() + { + Assert.AreEqual(_searchDrug.RootElement, null); + } + + [Test] + public void Should_Have_Version_Parameter() + { + Assert.That(_searchDrug.Parameters.Any(p => p.Name == "v" && p.Value.ToString() == "1")); + } + + [Test] + public void Should_Have_Authorization_Parameter() + { + Assert.That(_searchDrug.Parameters.Any(p => p.Name == "Authorization" && + p.Value.ToString() == string.Format("Bearer {0}+x-no-pass", _apiId))); + } + + [Test] + public void Should_Have_Correct_Parameters() + { + Assert.That(_searchDrug.Parameters.Any(p => p.Name == "q" && p.Value.ToString() == _query)); + } + + } +} \ No newline at end of file diff --git a/CoverMyDotNet.Tests/SearchFormsTests.cs b/CoverMyDotNet.Tests/SearchFormsTests.cs new file mode 100644 index 0000000..20dedd8 --- /dev/null +++ b/CoverMyDotNet.Tests/SearchFormsTests.cs @@ -0,0 +1,100 @@ +using System.Net.Http; +using System; +using NUnit.Framework; +using Moq; +using RestSharp; +using System.Linq; +using CoverMyDotNet.Requests; + +namespace CoverMyDotNet.Tests +{ + [TestFixture] + public class SearchFormsTests + { + private string _apiId; + private string _drugId; + private string _state; + private string _bin; + private string _pcn; + private string _groupId; + private string _threshold; + + private string _query; + + private SearchForm _searchFormSimple; + private SearchForm _searchFormComplex; + + [SetUp] + public void Setup() + { + _apiId = Guid.NewGuid().ToString(); + _drugId = Guid.NewGuid().ToString(); + _state = Guid.NewGuid().ToString(); + _bin = Guid.NewGuid().ToString(); + _pcn = Guid.NewGuid().ToString(); + _groupId = Guid.NewGuid().ToString(); + _threshold = Guid.NewGuid().ToString(); + _query = Guid.NewGuid().ToString(); + + _searchFormSimple = new SearchForm(_apiId, _drugId, _state, _query); + _searchFormComplex = new SearchForm(_apiId, _drugId, _state, _threshold, + _bin, _pcn, _groupId); + } + + [Test] + public void Should_Use_Correct_Method() + { + Assert.AreEqual(_searchFormSimple.Method, Method.GET); + Assert.AreEqual(_searchFormComplex.Method, Method.GET); + } + + [Test] + public void Should_Use_Correct_Resource() + { + Assert.AreEqual(_searchFormSimple.Resource, "forms"); + Assert.AreEqual(_searchFormComplex.Resource, "forms"); + } + + [Test] + public void Should_Use_Correct_RootElement() + { + Assert.IsNull(_searchFormSimple.RootElement); + Assert.IsNull(_searchFormComplex.RootElement); + } + + [Test] + public void Should_Have_Version_Parameter() + { + Assert.That(_searchFormSimple.Parameters.Any(p => p.Name == "v" && p.Value.ToString() == "1")); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "v" && p.Value.ToString() == "1")); + + } + + [Test] + public void Should_Have_Authorization_Parameter() + { + Assert.That(_searchFormSimple.Parameters.Any(p => p.Name == "Authorization" && + p.Value.ToString() == string.Format("Bearer {0}+x-no-pass", _apiId))); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "Authorization" && + p.Value.ToString() == string.Format("Bearer {0}+x-no-pass", _apiId))); + } + + [Test] + public void Should_Have_Correct_Query_Params() + { + Assert.That(_searchFormSimple.Parameters.Any(p => p.Name == "drug_id" && p.Value.ToString() == _drugId)); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "drug_id" && p.Value.ToString() == _drugId)); + + Assert.That(_searchFormSimple.Parameters.Any(p => p.Name == "state" && p.Value.ToString() == _state)); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "state" && p.Value.ToString() == _state)); + + Assert.That(_searchFormSimple.Parameters.Any(p => p.Name == "q" && p.Value.ToString() == _query)); + + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "bin" && p.Value.ToString() == _bin)); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "pcn" && p.Value.ToString() == _pcn)); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "group_id" && p.Value.ToString() == _groupId)); + Assert.That(_searchFormComplex.Parameters.Any(p => p.Name == "threshold" && p.Value.ToString() == _threshold)); + + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Client.cs b/CoverMyDotNet/Client.cs index 16d7a17..bcdc00d 100755 --- a/CoverMyDotNet/Client.cs +++ b/CoverMyDotNet/Client.cs @@ -1,6 +1,7 @@ using RestSharp; using System.Net.Http; using System; +using System.Collections.Generic; namespace CoverMyDotNet { @@ -56,14 +57,50 @@ public void UpdateRequest(string requestId, string tokenId, string memo) Execute(request); } - public void DeleteResponse(string requestId, string tokenId, RemoteUserAttributes remoteUser) + public IRestResponse DeleteResponse(string requestId, string tokenId, RemoteUserAttributes remoteUser) { var request = new Requests.DeleteRequest(_apiId, tokenId, requestId, new DeleteRequestModel() { RemoteUser = remoteUser, TokenId = tokenId }); - Execute(request); + return Execute(request); + } + + public IRestResponse GetRequestPage(string requestId, string tokenId) + { + var request = new Requests.GetRequestPage(_apiId, _apiSecret, requestId, tokenId); + return Execute(request); + } + + public DrugListAttributes SearchDrugs(string query) + { + var request = new Requests.SearchDrugs(_apiId, query); + return Execute(request).Data; + } + + public DrugAttributes GetDrug(string id) + { + var request = new Requests.GetDrug(_apiId, id); + return Execute(request).Data; + } + + public FormAttributes GetForm(string id) + { + var request = new Requests.GetForm(_apiId, id); + return Execute(request).Data; + } + + public FormAttributeList SearchForms(string drugId, string state, string threshold, + string bin, string pcn, string groupId) + { + var request = new Requests.SearchForm(_apiId, drugId, state, threshold, bin, pcn, groupId); + return Execute(request).Data; + } + public FormAttributeList SearchForms(string drugId, string state, string q) + { + var request = new Requests.SearchForm(_apiId, drugId, state, q); + return Execute(request).Data; } } } diff --git a/CoverMyDotNet/CoverMyDotNet.csproj b/CoverMyDotNet/CoverMyDotNet.csproj index 357f37a..0cce801 100755 --- a/CoverMyDotNet/CoverMyDotNet.csproj +++ b/CoverMyDotNet/CoverMyDotNet.csproj @@ -1,4 +1,3 @@ - Debug @@ -49,20 +48,33 @@ - - + + - + + + + + + + + + + + + + + diff --git a/CoverMyDotNet/Models/Common/DrugAttributes.cs b/CoverMyDotNet/Models/Common/DrugAttributes.cs new file mode 100644 index 0000000..67f1a35 --- /dev/null +++ b/CoverMyDotNet/Models/Common/DrugAttributes.cs @@ -0,0 +1,27 @@ +using System; +using RestSharp.Serializers; +using System.Collections.Generic; + +namespace CoverMyDotNet +{ + public class DrugListAttributes + { + public List Drugs{get; set;} + } + + public class DrugAttributes + { + public string Id { get; set; } + public string GPI { get; set; } + public object SortGroup { get; set; } + public object SortOrder { get; set; } + public string Name { get; set; } + public string RouteOfAdministration { get; set; } + public string DosageForm { get; set; } + public string Strength { get; set; } + public string StrengthUnitOfMeasure { get; set; } + public string DosageNormName { get; set; } + public string FullName { get; set; } + public string Href { get; set; } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Models/Common/FormAttributes.cs b/CoverMyDotNet/Models/Common/FormAttributes.cs new file mode 100644 index 0000000..032412c --- /dev/null +++ b/CoverMyDotNet/Models/Common/FormAttributes.cs @@ -0,0 +1,29 @@ +using System; +using RestSharp.Serializers; +using System.Collections.Generic; + +namespace CoverMyDotNet +{ + public class FormAttributes + { + public int Id { get; set; } + public string Href { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string Directions { get; set; } + public string RequestFormId { get; set; } + public string ThumbnailUrl { get; set; } + public string PreviewUrl { get; set; } + public bool IsEPA { get; set; } + public string ContactName { get; set; } + public string ContactPhone { get; set; } + public string ContactFax { get; set; } + public double Score { get; set; } + public bool Active { get; set; } + public bool IsEnrollment { get; set; } + } + public class FormAttributeList + { + public List Forms {get; set;} + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Requests/DeleteToken.cs b/CoverMyDotNet/Requests/DeleteToken.cs new file mode 100644 index 0000000..f89bc70 --- /dev/null +++ b/CoverMyDotNet/Requests/DeleteToken.cs @@ -0,0 +1,19 @@ +using System; +using System.Text; +using RestSharp; + +namespace CoverMyDotNet.Requests +{ + public class DeleteToken : RestRequest + { + public DeleteToken(string apiId, string apiSecret, string tokenId) + { + this.Method = Method.DELETE; + this.Resource = string.Format("requests/tokens/{0}", tokenId); + this.AddQueryParameter("v", "1"); + this.AddParameter("Authorization", "Basic " + Convert.ToBase64String( + Encoding.ASCII.GetBytes(string.Format("{0}:{1}", apiId, apiSecret))), + ParameterType.HttpHeader); + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Requests/GetDrug.cs b/CoverMyDotNet/Requests/GetDrug.cs new file mode 100644 index 0000000..fb73f1b --- /dev/null +++ b/CoverMyDotNet/Requests/GetDrug.cs @@ -0,0 +1,17 @@ +using System; +using RestSharp; + +namespace CoverMyDotNet.Requests +{ + public class GetDrug : RestRequest + { + public GetDrug(string apiId, string id) : base() + { + this.Method = Method.GET; + Resource = string.Format("drugs/{0}", id); + RootElement = "drug"; + this.AddQueryParameter ("v", "1"); + this.AddParameter("Authorization", string.Format("Bearer {0}+x-no-pass", apiId), ParameterType.HttpHeader); + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Requests/GetForm.cs b/CoverMyDotNet/Requests/GetForm.cs new file mode 100644 index 0000000..c8ad6c3 --- /dev/null +++ b/CoverMyDotNet/Requests/GetForm.cs @@ -0,0 +1,17 @@ +using System; +using RestSharp; + +namespace CoverMyDotNet.Requests +{ + public class GetForm : RestRequest + { + public GetForm(string apiId, string formId) : base() + { + this.Method = Method.GET; + Resource = string.Format("forms/{0}", formId); + RootElement = "form"; + this.AddQueryParameter ("v", "1"); + this.AddParameter("Authorization", string.Format("Bearer {0}+x-no-pass", apiId), ParameterType.HttpHeader); + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Requests/PostToken.cs b/CoverMyDotNet/Requests/PostToken.cs new file mode 100644 index 0000000..de75004 --- /dev/null +++ b/CoverMyDotNet/Requests/PostToken.cs @@ -0,0 +1,24 @@ +using System; +using System.Text; +using RestSharp; +using System.Collections.Generic; + +namespace CoverMyDotNet.Requests +{ + public class PostToken : RestRequest + { + public PostToken(string apiId, string apiSecret, string[] requestIds) + { + this.Method = Method.POST; + this.Resource = "requests/tokens"; + this.AddQueryParameter("v", "1"); + this.JsonSerializer = new CoverMyDotNet.JsonSerializer (); + var body = new Dictionary(); + body.Add("request_ids", requestIds); + this.AddJsonBody(body); + this.AddParameter("Authorization", "Basic " + Convert.ToBase64String( + Encoding.ASCII.GetBytes(string.Format("{0}:{1}", apiId, apiSecret))), + ParameterType.HttpHeader); + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Requests/SearchDrugs.cs b/CoverMyDotNet/Requests/SearchDrugs.cs new file mode 100644 index 0000000..a3617f4 --- /dev/null +++ b/CoverMyDotNet/Requests/SearchDrugs.cs @@ -0,0 +1,17 @@ +using System; +using RestSharp; + +namespace CoverMyDotNet.Requests +{ + public class SearchDrugs : RestRequest + { + public SearchDrugs(string apiId, string query) : base() + { + this.Method = Method.GET; + Resource = "drugs"; + this.AddQueryParameter ("v", "1"); + this.AddQueryParameter ("q", query); + this.AddParameter("Authorization", string.Format("Bearer {0}+x-no-pass", apiId), ParameterType.HttpHeader); + } + } +} \ No newline at end of file diff --git a/CoverMyDotNet/Requests/SearchForm.cs b/CoverMyDotNet/Requests/SearchForm.cs new file mode 100644 index 0000000..dcf3e91 --- /dev/null +++ b/CoverMyDotNet/Requests/SearchForm.cs @@ -0,0 +1,31 @@ +using System; +using RestSharp; + +namespace CoverMyDotNet.Requests +{ + public class SearchForm : RestRequest + { + public SearchForm(string apiId, string drugId, string state, string threshold, + string bin, string pcn, string groupId) : this(apiId, drugId, state) + { + this.AddQueryParameter("drug_id", drugId); + this.AddQueryParameter("state", state); + this.AddQueryParameter("bin", bin); + this.AddQueryParameter("pcn", pcn); + this.AddQueryParameter("groupId", groupId); + this.AddQueryParameter("threshold", threshold); + } + + public SearchForm(string apiId, string drugId, string state, string q = "") : base() + { + this.Method = Method.GET; + Resource = "forms"; + this.AddQueryParameter ("v", "1"); + this.AddParameter("Authorization", string.Format("Bearer {0}+x-no-pass", apiId), ParameterType.HttpHeader); + this.AddQueryParameter("drug_id", drugId); + this.AddQueryParameter("state", state); + if(q != "") + this.AddQueryParameter("q", q); + } + } +} \ No newline at end of file diff --git a/RestSharp.105.0.1/lib/net35-client/RestSharp.dll b/RestSharp.105.0.1/lib/net35-client/RestSharp.dll deleted file mode 100644 index bad4e31..0000000 Binary files a/RestSharp.105.0.1/lib/net35-client/RestSharp.dll and /dev/null differ diff --git a/RestSharp.105.0.1/lib/net35-client/RestSharp.xml b/RestSharp.105.0.1/lib/net35-client/RestSharp.xml deleted file mode 100644 index 660df77..0000000 --- a/RestSharp.105.0.1/lib/net35-client/RestSharp.xml +++ /dev/null @@ -1,2856 +0,0 @@ - - - - RestSharp - - - - - Tries to Authenticate with the credentials of the currently logged in user, or impersonate a user - - - - - Authenticate with the credentials of the currently logged in user - - - - - Authenticate by impersonation - - - - - - - Authenticate by impersonation, using an existing ICredentials instance - - - - - - - - - Base class for OAuth 2 Authenticators. - - - Since there are many ways to authenticate in OAuth2, - this is used as a base class to differentiate between - other authenticators. - - Any other OAuth2 authenticators must derive from this - abstract class. - - - - - Access token to be used when authenticating. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Gets the access token. - - - - - The OAuth 2 authenticator using URI query parameter. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.2 - - - - - Initializes a new instance of the class. - - - The access token. - - - - - The OAuth 2 authenticator using the authorization request header field. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1 - - - - - Stores the Authorization header value as "[tokenType] accessToken". used for performance. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Initializes a new instance of the class. - - - The access token. - - - The token type. - - - - - All text parameters are UTF-8 encoded (per section 5.1). - - - - - - Generates a random 16-byte lowercase alphanumeric string. - - - - - - - Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT" - - - - - - - Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT" - - - A specified point in time. - - - - - The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - The value to escape. - The escaped value. - - The method is supposed to take on - RFC 3986 behavior if certain elements are present in a .config file. Even if this - actually worked (which in my experiments it doesn't), we can't rely on every - host actually having this configuration element present. - - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - - - - - - Sorts a collection of key-value pairs by name, and then value if equal, - concatenating them into a single string. This string should be encoded - prior to, or after normalization is run. - - - - - - - - Sorts a by name, and then value if equal. - - A collection of parameters to sort - A sorted parameter collection - - - - Creates a request URL suitable for making OAuth requests. - Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. - Resulting URLs must be lower case. - - - The original request URL - - - - - Creates a request elements concatentation value to send with a request. - This is also known as the signature base. - - - - The request's HTTP method type - The request URL - The request's parameters - A signature base string - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The signature base - The consumer secret - The token secret - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer secret - The token secret - - - - - A class to encapsulate OAuth authentication flow. - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - Any existing, non-OAuth query parameters desired in the request - - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - Generates a instance to pass to an - for the purpose of exchanging user credentials - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - - - - - - - - - - Allows control how class and property names and values are deserialized by XmlAttributeDeserializer - - - - - The name to use for the serialized element - - - - - Sets if the property to Deserialize is an Attribute or Element (Default: false) - - - - - Decodes an HTML-encoded string and returns the decoded string. - - The HTML string to decode. - The decoded text. - - - - Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream. - - The HTML string to decode - The TextWriter output stream containing the decoded string. - - - - HTML-encodes a string and sends the resulting output to a TextWriter output stream. - - The string to encode. - The TextWriter output stream containing the encoded string. - - - - Convert a to a instance. - - The response status. - - responseStatus - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Request to be executed - Callback function to be executed upon completion - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Target deserialization type - Request to be executed - Callback function to be executed upon completion providing access to the async handle - - - - Add a parameter to use on every request made with this client instance - - The IRestClient instance - Parameter to add - - - - - Removes a parameter from the default parameters that are used on every request made with this client instance - - The IRestClient instance - The name of the parameter that needs to be removed - - - - - Adds a HTTP parameter (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - Used on every request made by this client instance - - The IRestClient instance - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - The IRestClient instance - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddDefaultParameter(name, value, HttpHeader) overload - - The IRestClient instance - Name of the header to add - Value of the header to add - - - - - Shortcut to AddDefaultParameter(name, value, UrlSegment) overload - - The IRestClient instance - Name of the segment to add - Value of the segment to add - - - - - Uses Uri.EscapeDataString() based on recommendations on MSDN - http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx - - - - - Check that a string is not null or empty - - String to check - bool - - - - Remove underscores from a string - - String to process - string - - - - Parses most common JSON date formats - - JSON value to parse - - DateTime - - - - Remove leading and trailing " from a string - - String to parse - String - - - - Checks a string to see if it matches a regex - - String to check - Pattern to match - bool - - - - Converts a string to pascal case - - String to convert - - string - - - - Converts a string to pascal case with the option to remove underscores - - String to convert - Option to remove underscores - - - - - - Converts a string to camel case - - String to convert - - String - - - - Convert the first letter of a string to lower case - - String to convert - string - - - - Checks to see if a string is all uppper case - - String to check - bool - - - - Add underscores to a pascal-cased string - - String to convert - string - - - - Add dashes to a pascal-cased string - - String to convert - string - - - - Add an undescore prefix to a pascasl-cased string - - - - - - - Add spaces to a pascal-cased string - - String to convert - string - - - - Return possible variants of a name for name matching. - - String to convert - The culture to use for conversion - IEnumerable<string> - - - - HttpWebRequest wrapper (sync methods) - - - HttpWebRequest wrapper - - - HttpWebRequest wrapper (async methods) - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - Execute a POST request - - - - - Execute a PUT request - - - - - Execute a GET request - - - - - Execute a HEAD request - - - - - Execute an OPTIONS request - - - - - Execute a DELETE request - - - - - Execute a PATCH request - - - - - Execute a MERGE request - - - - - Execute a GET-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - Execute a POST-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - Creates an IHttp - - - - - - Default constructor - - - - - Execute an async POST-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Execute an async GET-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - True if this HTTP request has any HTTP parameters - - - - - True if this HTTP request has any HTTP cookies - - - - - True if a request body has been specified - - - - - True if files have been set to be uploaded - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - UserAgent to be sent with request - - - - - Timeout in milliseconds to be used for the request - - - - - The number of milliseconds before the writing or reading times out. - - - - - System.Net.ICredentials to be sent with request - - - - - The System.Net.CookieContainer to be used for the request - - - - - The method to use to write the response instead of reading into RawBytes - - - - - Collection of files to be sent with request - - - - - Whether or not HTTP 3xx response redirects should be automatically followed - - - - - X509CertificateCollection to be sent with request - - - - - Maximum number of automatic redirects to follow if FollowRedirects is true - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. - - - - - HTTP headers to be sent with request - - - - - HTTP parameters (QueryString or Form values) to be sent with request - - - - - HTTP cookies to be sent with request - - - - - Request body to be sent with request - - - - - Content type of the request body. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - URL to call for this request - - - - - Flag to send authorisation header with the HttpWebRequest - - - - - Proxy info to be sent with request - - - - - Representation of an HTTP cookie - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - HTTP response data - - - - - HTTP response data - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Default constructor - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - Lazy-loaded string representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Types of parameters that can be added to requests - - - - - Data formats - - - - - HTTP method to use when making requests - - - - - Format strings for commonly-used date formats - - - - - .NET format string for ISO 8601 date format - - - - - .NET format string for roundtrip date format - - - - - Status for responses (surprised?) - - - - - Extension method overload! - - - - - Save a byte array to a file - - Bytes to save - Full path to save file to - - - - Read a stream into a byte array - - Stream to read - byte[] - - - - Copies bytes from one stream to another - - The input stream. - The output stream. - - - - Converts a byte array to a string, using its byte order mark to convert it to the right encoding. - http://www.shrinkrays.net/code-snippets/csharp/an-extension-method-for-converting-a-byte-array-to-a-string.aspx - - An array of bytes to convert - The byte as a string. - - - - Reflection extensions - - - - - Retrieve an attribute from a member (property) - - Type of attribute to retrieve - Member to retrieve attribute from - - - - - Retrieve an attribute from a type - - Type of attribute to retrieve - Type to retrieve attribute from - - - - - Checks a type to see if it derives from a raw generic (e.g. List[[]]) - - - - - - - - Find a value from a System.Enum by trying several possible variants - of the string value of the enum. - - Type of enum - Value for which to search - The culture used to calculate the name variants - - - - - XML Extension Methods - - - - - Returns the name of an element with the namespace if specified - - Element name - XML Namespace - - - - - Container for files to be uploaded with requests - - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The content type to use in the request. - The - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The using the default content type. - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Container for HTTP file - - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Representation of an HTTP header - - - - - Name of the header - - - - - Value of the header - - - - - Representation of an HTTP parameter (QueryString or Form value) - - - - - Name of the parameter - - - - - Value of the parameter - - - - - - - - - - - - - - - - - - - - - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X509CertificateCollection to be sent with request - - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are five types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - Cookie: Adds the name/value pair to the HTTP request's Cookies collection - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container for data sent back from API - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exceptions thrown during the request, if any. - - Will contain only network transport or framework exceptions thrown during the request. - HTTP protocol errors are handled by RestSharp and will not appear here. - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Base class for common properties shared by RestResponse and RestResponse[[T]] - - - - - Default constructor - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - The exception thrown during the request, if any - - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Container for data sent back from API - - - - - Parameter container for REST requests - - - - - Return a human-readable representation of this parameter - - String - - - - Name of the parameter - - - - - Value of the parameter - - - - - Type of the parameter - - - - - Client to translate RestRequests into Http requests and process response result - - - - - Default constructor that registers default content handlers - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Registers a content handler to process response content - - MIME content type of the response content - Deserializer to use to process content - - - - Remove a content handler for the specified MIME content type - - MIME content type to remove - - - - Remove all content handlers - - - - - Retrieve the handler for the specified MIME content type - - MIME content type to retrieve - IDeserializer instance - - - - Assembles URL to call based on parameters, method and resource - - RestRequest to execute - Assembled System.Uri - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes the specified request and downloads the response data - - Request to execute - Response data - - - - Executes the request and returns a response, authenticating if needed - - Request to be executed - RestResponse - - - - Executes the specified request and deserializes the response content using the appropriate content handler - - Target deserialization type - Request to execute - RestResponse[[T]] with deserialized data in Data property - - - - Parameters included with every request made with this instance of RestClient - If specified in both client and request, the request wins - - - - - Maximum number of redirects to follow if FollowRedirects is true - - - - - X509CertificateCollection to be sent with request - - - - - Proxy to use for requests made by this client instance. - Passed on to underlying WebRequest if set. - - - - - Default is true. Determine whether or not requests that result in - HTTP status codes of 3xx should follow returned redirect - - - - - The CookieContainer used for requests made by this client instance - - - - - UserAgent to use for requests made by this client instance - - - - - Timeout in milliseconds to use for requests made by this client instance - - - - - The number of milliseconds before the writing or reading times out. - - - - - Whether to invoke async callbacks using the SynchronizationContext.Current captured when invoked - - - - - Authenticator to use for requests made by this client instance - - - - - Combined with Request.Resource to construct URL for request - Should include scheme and domain without trailing slash. - - - client.BaseUrl = new Uri("http://example.com"); - - - - - Container for data used to make requests - - - - - Default constructor - - - - - Sets Method property to value of method - - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Internal Method so that RestClient can increase the number of attempts - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - A function to run prior to deserializing starting (e.g. change settings if error encountered) - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Gets or sets a user-defined state object that contains information about a request and which can be later - retrieved when the request completes. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Encoding for serialized content - - - - - Need to subclass StringWriter in order to override Encoding - - - - - Default JSON serializer for request bodies - Doesn't currently use the SerializeAs attribute, defers to Newtonsoft's attributes - - - - - Default serializer - - - - - Serialize the object as JSON - - Object to serialize - JSON as String - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Content type for serialized content - - - - - Allows control how class and property names and values are serialized by XmlSerializer - Currently not supported with the JsonSerializer - When specified at the property level the class-level specification is overridden - - - - - Called by the attribute when NameStyle is speficied - - The string to transform - String - - - - The name to use for the serialized element - - - - - Sets the value to be serialized as an Attribute instead of an Element - - - - - The culture to use when serializing - - - - - Transforms the casing of the name based on the selected value. - - - - - The order to serialize the element. Default is int.MaxValue. - - - - - Options for transforming casing of element names - - - - - Default XML Serializer - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Represents the json array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The capacity of the json array. - - - - The json representation of the array. - - The json representation of the array. - - - - Represents the json object. - - - - - The internal member dictionary. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The implementation to use when comparing keys, or null to use the default for the type of the key. - - - - Adds the specified key. - - The key. - The value. - - - - Determines whether the specified key contains key. - - The key. - - true if the specified key contains key; otherwise, false. - - - - - Removes the specified key. - - The key. - - - - - Tries the get value. - - The key. - The value. - - - - - Adds the specified item. - - The item. - - - - Clears this instance. - - - - - Determines whether [contains] [the specified item]. - - The item. - - true if [contains] [the specified item]; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the specified item. - - The item. - - - - - Gets the enumerator. - - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns a json that represents the current . - - - A json that represents the current . - - - - - Gets the at the specified index. - - - - - - Gets the keys. - - The keys. - - - - Gets the values. - - The values. - - - - Gets or sets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - - - - Try parsing the json string into a value. - - - A JSON string. - - - The object. - - - Returns true if successfull otherwise false. - - - - - Converts a IDictionary<string,object> / IList<object> object into a JSON string - - A IDictionary<string,object> / IList<object> - Serializer strategy to use - A JSON encoded string, or null if object 'json' is not serializable - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Helper methods for validating values - - - - - Validate an integer value is between the specified values (exclusive of min/max) - - Value to validate - Exclusive minimum value - Exclusive maximum value - - - - Validate a string length - - String to be validated - Maximum length of the string - - - - Helper methods for validating required values - - - - - Require a parameter to not be null - - Name of the parameter - Value of the parameter - - - diff --git a/RestSharp.105.0.1/lib/net35/RestSharp.dll b/RestSharp.105.0.1/lib/net35/RestSharp.dll deleted file mode 100644 index bad4e31..0000000 Binary files a/RestSharp.105.0.1/lib/net35/RestSharp.dll and /dev/null differ diff --git a/RestSharp.105.0.1/lib/net35/RestSharp.xml b/RestSharp.105.0.1/lib/net35/RestSharp.xml deleted file mode 100644 index 660df77..0000000 --- a/RestSharp.105.0.1/lib/net35/RestSharp.xml +++ /dev/null @@ -1,2856 +0,0 @@ - - - - RestSharp - - - - - Tries to Authenticate with the credentials of the currently logged in user, or impersonate a user - - - - - Authenticate with the credentials of the currently logged in user - - - - - Authenticate by impersonation - - - - - - - Authenticate by impersonation, using an existing ICredentials instance - - - - - - - - - Base class for OAuth 2 Authenticators. - - - Since there are many ways to authenticate in OAuth2, - this is used as a base class to differentiate between - other authenticators. - - Any other OAuth2 authenticators must derive from this - abstract class. - - - - - Access token to be used when authenticating. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Gets the access token. - - - - - The OAuth 2 authenticator using URI query parameter. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.2 - - - - - Initializes a new instance of the class. - - - The access token. - - - - - The OAuth 2 authenticator using the authorization request header field. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1 - - - - - Stores the Authorization header value as "[tokenType] accessToken". used for performance. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Initializes a new instance of the class. - - - The access token. - - - The token type. - - - - - All text parameters are UTF-8 encoded (per section 5.1). - - - - - - Generates a random 16-byte lowercase alphanumeric string. - - - - - - - Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT" - - - - - - - Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT" - - - A specified point in time. - - - - - The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - The value to escape. - The escaped value. - - The method is supposed to take on - RFC 3986 behavior if certain elements are present in a .config file. Even if this - actually worked (which in my experiments it doesn't), we can't rely on every - host actually having this configuration element present. - - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - - - - - - Sorts a collection of key-value pairs by name, and then value if equal, - concatenating them into a single string. This string should be encoded - prior to, or after normalization is run. - - - - - - - - Sorts a by name, and then value if equal. - - A collection of parameters to sort - A sorted parameter collection - - - - Creates a request URL suitable for making OAuth requests. - Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. - Resulting URLs must be lower case. - - - The original request URL - - - - - Creates a request elements concatentation value to send with a request. - This is also known as the signature base. - - - - The request's HTTP method type - The request URL - The request's parameters - A signature base string - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The signature base - The consumer secret - The token secret - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer secret - The token secret - - - - - A class to encapsulate OAuth authentication flow. - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - Any existing, non-OAuth query parameters desired in the request - - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - Generates a instance to pass to an - for the purpose of exchanging user credentials - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - - - - - - - - - - Allows control how class and property names and values are deserialized by XmlAttributeDeserializer - - - - - The name to use for the serialized element - - - - - Sets if the property to Deserialize is an Attribute or Element (Default: false) - - - - - Decodes an HTML-encoded string and returns the decoded string. - - The HTML string to decode. - The decoded text. - - - - Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream. - - The HTML string to decode - The TextWriter output stream containing the decoded string. - - - - HTML-encodes a string and sends the resulting output to a TextWriter output stream. - - The string to encode. - The TextWriter output stream containing the encoded string. - - - - Convert a to a instance. - - The response status. - - responseStatus - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Request to be executed - Callback function to be executed upon completion - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Target deserialization type - Request to be executed - Callback function to be executed upon completion providing access to the async handle - - - - Add a parameter to use on every request made with this client instance - - The IRestClient instance - Parameter to add - - - - - Removes a parameter from the default parameters that are used on every request made with this client instance - - The IRestClient instance - The name of the parameter that needs to be removed - - - - - Adds a HTTP parameter (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - Used on every request made by this client instance - - The IRestClient instance - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - The IRestClient instance - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddDefaultParameter(name, value, HttpHeader) overload - - The IRestClient instance - Name of the header to add - Value of the header to add - - - - - Shortcut to AddDefaultParameter(name, value, UrlSegment) overload - - The IRestClient instance - Name of the segment to add - Value of the segment to add - - - - - Uses Uri.EscapeDataString() based on recommendations on MSDN - http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx - - - - - Check that a string is not null or empty - - String to check - bool - - - - Remove underscores from a string - - String to process - string - - - - Parses most common JSON date formats - - JSON value to parse - - DateTime - - - - Remove leading and trailing " from a string - - String to parse - String - - - - Checks a string to see if it matches a regex - - String to check - Pattern to match - bool - - - - Converts a string to pascal case - - String to convert - - string - - - - Converts a string to pascal case with the option to remove underscores - - String to convert - Option to remove underscores - - - - - - Converts a string to camel case - - String to convert - - String - - - - Convert the first letter of a string to lower case - - String to convert - string - - - - Checks to see if a string is all uppper case - - String to check - bool - - - - Add underscores to a pascal-cased string - - String to convert - string - - - - Add dashes to a pascal-cased string - - String to convert - string - - - - Add an undescore prefix to a pascasl-cased string - - - - - - - Add spaces to a pascal-cased string - - String to convert - string - - - - Return possible variants of a name for name matching. - - String to convert - The culture to use for conversion - IEnumerable<string> - - - - HttpWebRequest wrapper (sync methods) - - - HttpWebRequest wrapper - - - HttpWebRequest wrapper (async methods) - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - Execute a POST request - - - - - Execute a PUT request - - - - - Execute a GET request - - - - - Execute a HEAD request - - - - - Execute an OPTIONS request - - - - - Execute a DELETE request - - - - - Execute a PATCH request - - - - - Execute a MERGE request - - - - - Execute a GET-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - Execute a POST-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - Creates an IHttp - - - - - - Default constructor - - - - - Execute an async POST-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Execute an async GET-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - True if this HTTP request has any HTTP parameters - - - - - True if this HTTP request has any HTTP cookies - - - - - True if a request body has been specified - - - - - True if files have been set to be uploaded - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - UserAgent to be sent with request - - - - - Timeout in milliseconds to be used for the request - - - - - The number of milliseconds before the writing or reading times out. - - - - - System.Net.ICredentials to be sent with request - - - - - The System.Net.CookieContainer to be used for the request - - - - - The method to use to write the response instead of reading into RawBytes - - - - - Collection of files to be sent with request - - - - - Whether or not HTTP 3xx response redirects should be automatically followed - - - - - X509CertificateCollection to be sent with request - - - - - Maximum number of automatic redirects to follow if FollowRedirects is true - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. - - - - - HTTP headers to be sent with request - - - - - HTTP parameters (QueryString or Form values) to be sent with request - - - - - HTTP cookies to be sent with request - - - - - Request body to be sent with request - - - - - Content type of the request body. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - URL to call for this request - - - - - Flag to send authorisation header with the HttpWebRequest - - - - - Proxy info to be sent with request - - - - - Representation of an HTTP cookie - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - HTTP response data - - - - - HTTP response data - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Default constructor - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - Lazy-loaded string representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Types of parameters that can be added to requests - - - - - Data formats - - - - - HTTP method to use when making requests - - - - - Format strings for commonly-used date formats - - - - - .NET format string for ISO 8601 date format - - - - - .NET format string for roundtrip date format - - - - - Status for responses (surprised?) - - - - - Extension method overload! - - - - - Save a byte array to a file - - Bytes to save - Full path to save file to - - - - Read a stream into a byte array - - Stream to read - byte[] - - - - Copies bytes from one stream to another - - The input stream. - The output stream. - - - - Converts a byte array to a string, using its byte order mark to convert it to the right encoding. - http://www.shrinkrays.net/code-snippets/csharp/an-extension-method-for-converting-a-byte-array-to-a-string.aspx - - An array of bytes to convert - The byte as a string. - - - - Reflection extensions - - - - - Retrieve an attribute from a member (property) - - Type of attribute to retrieve - Member to retrieve attribute from - - - - - Retrieve an attribute from a type - - Type of attribute to retrieve - Type to retrieve attribute from - - - - - Checks a type to see if it derives from a raw generic (e.g. List[[]]) - - - - - - - - Find a value from a System.Enum by trying several possible variants - of the string value of the enum. - - Type of enum - Value for which to search - The culture used to calculate the name variants - - - - - XML Extension Methods - - - - - Returns the name of an element with the namespace if specified - - Element name - XML Namespace - - - - - Container for files to be uploaded with requests - - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The content type to use in the request. - The - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The using the default content type. - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Container for HTTP file - - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Representation of an HTTP header - - - - - Name of the header - - - - - Value of the header - - - - - Representation of an HTTP parameter (QueryString or Form value) - - - - - Name of the parameter - - - - - Value of the parameter - - - - - - - - - - - - - - - - - - - - - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X509CertificateCollection to be sent with request - - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are five types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - Cookie: Adds the name/value pair to the HTTP request's Cookies collection - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container for data sent back from API - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exceptions thrown during the request, if any. - - Will contain only network transport or framework exceptions thrown during the request. - HTTP protocol errors are handled by RestSharp and will not appear here. - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Base class for common properties shared by RestResponse and RestResponse[[T]] - - - - - Default constructor - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - The exception thrown during the request, if any - - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Container for data sent back from API - - - - - Parameter container for REST requests - - - - - Return a human-readable representation of this parameter - - String - - - - Name of the parameter - - - - - Value of the parameter - - - - - Type of the parameter - - - - - Client to translate RestRequests into Http requests and process response result - - - - - Default constructor that registers default content handlers - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Registers a content handler to process response content - - MIME content type of the response content - Deserializer to use to process content - - - - Remove a content handler for the specified MIME content type - - MIME content type to remove - - - - Remove all content handlers - - - - - Retrieve the handler for the specified MIME content type - - MIME content type to retrieve - IDeserializer instance - - - - Assembles URL to call based on parameters, method and resource - - RestRequest to execute - Assembled System.Uri - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes the specified request and downloads the response data - - Request to execute - Response data - - - - Executes the request and returns a response, authenticating if needed - - Request to be executed - RestResponse - - - - Executes the specified request and deserializes the response content using the appropriate content handler - - Target deserialization type - Request to execute - RestResponse[[T]] with deserialized data in Data property - - - - Parameters included with every request made with this instance of RestClient - If specified in both client and request, the request wins - - - - - Maximum number of redirects to follow if FollowRedirects is true - - - - - X509CertificateCollection to be sent with request - - - - - Proxy to use for requests made by this client instance. - Passed on to underlying WebRequest if set. - - - - - Default is true. Determine whether or not requests that result in - HTTP status codes of 3xx should follow returned redirect - - - - - The CookieContainer used for requests made by this client instance - - - - - UserAgent to use for requests made by this client instance - - - - - Timeout in milliseconds to use for requests made by this client instance - - - - - The number of milliseconds before the writing or reading times out. - - - - - Whether to invoke async callbacks using the SynchronizationContext.Current captured when invoked - - - - - Authenticator to use for requests made by this client instance - - - - - Combined with Request.Resource to construct URL for request - Should include scheme and domain without trailing slash. - - - client.BaseUrl = new Uri("http://example.com"); - - - - - Container for data used to make requests - - - - - Default constructor - - - - - Sets Method property to value of method - - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Internal Method so that RestClient can increase the number of attempts - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - A function to run prior to deserializing starting (e.g. change settings if error encountered) - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Gets or sets a user-defined state object that contains information about a request and which can be later - retrieved when the request completes. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Encoding for serialized content - - - - - Need to subclass StringWriter in order to override Encoding - - - - - Default JSON serializer for request bodies - Doesn't currently use the SerializeAs attribute, defers to Newtonsoft's attributes - - - - - Default serializer - - - - - Serialize the object as JSON - - Object to serialize - JSON as String - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Content type for serialized content - - - - - Allows control how class and property names and values are serialized by XmlSerializer - Currently not supported with the JsonSerializer - When specified at the property level the class-level specification is overridden - - - - - Called by the attribute when NameStyle is speficied - - The string to transform - String - - - - The name to use for the serialized element - - - - - Sets the value to be serialized as an Attribute instead of an Element - - - - - The culture to use when serializing - - - - - Transforms the casing of the name based on the selected value. - - - - - The order to serialize the element. Default is int.MaxValue. - - - - - Options for transforming casing of element names - - - - - Default XML Serializer - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Represents the json array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The capacity of the json array. - - - - The json representation of the array. - - The json representation of the array. - - - - Represents the json object. - - - - - The internal member dictionary. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The implementation to use when comparing keys, or null to use the default for the type of the key. - - - - Adds the specified key. - - The key. - The value. - - - - Determines whether the specified key contains key. - - The key. - - true if the specified key contains key; otherwise, false. - - - - - Removes the specified key. - - The key. - - - - - Tries the get value. - - The key. - The value. - - - - - Adds the specified item. - - The item. - - - - Clears this instance. - - - - - Determines whether [contains] [the specified item]. - - The item. - - true if [contains] [the specified item]; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the specified item. - - The item. - - - - - Gets the enumerator. - - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns a json that represents the current . - - - A json that represents the current . - - - - - Gets the at the specified index. - - - - - - Gets the keys. - - The keys. - - - - Gets the values. - - The values. - - - - Gets or sets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - - - - Try parsing the json string into a value. - - - A JSON string. - - - The object. - - - Returns true if successfull otherwise false. - - - - - Converts a IDictionary<string,object> / IList<object> object into a JSON string - - A IDictionary<string,object> / IList<object> - Serializer strategy to use - A JSON encoded string, or null if object 'json' is not serializable - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Helper methods for validating values - - - - - Validate an integer value is between the specified values (exclusive of min/max) - - Value to validate - Exclusive minimum value - Exclusive maximum value - - - - Validate a string length - - String to be validated - Maximum length of the string - - - - Helper methods for validating required values - - - - - Require a parameter to not be null - - Name of the parameter - Value of the parameter - - - diff --git a/RestSharp.105.0.1/lib/net4-client/RestSharp.dll b/RestSharp.105.0.1/lib/net4-client/RestSharp.dll deleted file mode 100644 index ea01262..0000000 Binary files a/RestSharp.105.0.1/lib/net4-client/RestSharp.dll and /dev/null differ diff --git a/RestSharp.105.0.1/lib/net4-client/RestSharp.xml b/RestSharp.105.0.1/lib/net4-client/RestSharp.xml deleted file mode 100644 index 27a71c7..0000000 --- a/RestSharp.105.0.1/lib/net4-client/RestSharp.xml +++ /dev/null @@ -1,3024 +0,0 @@ - - - - RestSharp - - - - - Tries to Authenticate with the credentials of the currently logged in user, or impersonate a user - - - - - Authenticate with the credentials of the currently logged in user - - - - - Authenticate by impersonation - - - - - - - Authenticate by impersonation, using an existing ICredentials instance - - - - - - - - - Base class for OAuth 2 Authenticators. - - - Since there are many ways to authenticate in OAuth2, - this is used as a base class to differentiate between - other authenticators. - - Any other OAuth2 authenticators must derive from this - abstract class. - - - - - Access token to be used when authenticating. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Gets the access token. - - - - - The OAuth 2 authenticator using URI query parameter. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.2 - - - - - Initializes a new instance of the class. - - - The access token. - - - - - The OAuth 2 authenticator using the authorization request header field. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1 - - - - - Stores the Authorization header value as "[tokenType] accessToken". used for performance. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Initializes a new instance of the class. - - - The access token. - - - The token type. - - - - - All text parameters are UTF-8 encoded (per section 5.1). - - - - - - Generates a random 16-byte lowercase alphanumeric string. - - - - - - - Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT" - - - - - - - Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT" - - - A specified point in time. - - - - - The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - The value to escape. - The escaped value. - - The method is supposed to take on - RFC 3986 behavior if certain elements are present in a .config file. Even if this - actually worked (which in my experiments it doesn't), we can't rely on every - host actually having this configuration element present. - - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - - - - - - Sorts a collection of key-value pairs by name, and then value if equal, - concatenating them into a single string. This string should be encoded - prior to, or after normalization is run. - - - - - - - - Sorts a by name, and then value if equal. - - A collection of parameters to sort - A sorted parameter collection - - - - Creates a request URL suitable for making OAuth requests. - Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. - Resulting URLs must be lower case. - - - The original request URL - - - - - Creates a request elements concatentation value to send with a request. - This is also known as the signature base. - - - - The request's HTTP method type - The request URL - The request's parameters - A signature base string - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The signature base - The consumer secret - The token secret - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer secret - The token secret - - - - - A class to encapsulate OAuth authentication flow. - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - Any existing, non-OAuth query parameters desired in the request - - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - Generates a instance to pass to an - for the purpose of exchanging user credentials - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - - - - - - - - - - Allows control how class and property names and values are deserialized by XmlAttributeDeserializer - - - - - The name to use for the serialized element - - - - - Sets if the property to Deserialize is an Attribute or Element (Default: false) - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Types of parameters that can be added to requests - - - - - Data formats - - - - - HTTP method to use when making requests - - - - - Format strings for commonly-used date formats - - - - - .NET format string for ISO 8601 date format - - - - - .NET format string for roundtrip date format - - - - - Status for responses (surprised?) - - - - - Extension method overload! - - - - - Save a byte array to a file - - Bytes to save - Full path to save file to - - - - Read a stream into a byte array - - Stream to read - byte[] - - - - Copies bytes from one stream to another - - The input stream. - The output stream. - - - - Converts a byte array to a string, using its byte order mark to convert it to the right encoding. - http://www.shrinkrays.net/code-snippets/csharp/an-extension-method-for-converting-a-byte-array-to-a-string.aspx - - An array of bytes to convert - The byte as a string. - - - - Decodes an HTML-encoded string and returns the decoded string. - - The HTML string to decode. - The decoded text. - - - - Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream. - - The HTML string to decode - The TextWriter output stream containing the decoded string. - - - - HTML-encodes a string and sends the resulting output to a TextWriter output stream. - - The string to encode. - The TextWriter output stream containing the encoded string. - - - - Reflection extensions - - - - - Retrieve an attribute from a member (property) - - Type of attribute to retrieve - Member to retrieve attribute from - - - - - Retrieve an attribute from a type - - Type of attribute to retrieve - Type to retrieve attribute from - - - - - Checks a type to see if it derives from a raw generic (e.g. List[[]]) - - - - - - - - Find a value from a System.Enum by trying several possible variants - of the string value of the enum. - - Type of enum - Value for which to search - The culture used to calculate the name variants - - - - - Convert a to a instance. - - The response status. - - responseStatus - - - - Uses Uri.EscapeDataString() based on recommendations on MSDN - http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx - - - - - Check that a string is not null or empty - - String to check - bool - - - - Remove underscores from a string - - String to process - string - - - - Parses most common JSON date formats - - JSON value to parse - - DateTime - - - - Remove leading and trailing " from a string - - String to parse - String - - - - Checks a string to see if it matches a regex - - String to check - Pattern to match - bool - - - - Converts a string to pascal case - - String to convert - - string - - - - Converts a string to pascal case with the option to remove underscores - - String to convert - Option to remove underscores - - - - - - Converts a string to camel case - - String to convert - - String - - - - Convert the first letter of a string to lower case - - String to convert - string - - - - Checks to see if a string is all uppper case - - String to check - bool - - - - Add underscores to a pascal-cased string - - String to convert - string - - - - Add dashes to a pascal-cased string - - String to convert - string - - - - Add an undescore prefix to a pascasl-cased string - - - - - - - Add spaces to a pascal-cased string - - String to convert - string - - - - Return possible variants of a name for name matching. - - String to convert - The culture to use for conversion - IEnumerable<string> - - - - XML Extension Methods - - - - - Returns the name of an element with the namespace if specified - - Element name - XML Namespace - - - - - Container for files to be uploaded with requests - - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The content type to use in the request. - The - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The using the default content type. - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - HttpWebRequest wrapper (async methods) - - - HttpWebRequest wrapper - - - HttpWebRequest wrapper (sync methods) - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - Execute an async POST-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Execute an async GET-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Creates an IHttp - - - - - - Default constructor - - - - - Execute a POST request - - - - - Execute a PUT request - - - - - Execute a GET request - - - - - Execute a HEAD request - - - - - Execute an OPTIONS request - - - - - Execute a DELETE request - - - - - Execute a PATCH request - - - - - Execute a MERGE request - - - - - Execute a GET-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - Execute a POST-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - True if this HTTP request has any HTTP parameters - - - - - True if this HTTP request has any HTTP cookies - - - - - True if a request body has been specified - - - - - True if files have been set to be uploaded - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - UserAgent to be sent with request - - - - - Timeout in milliseconds to be used for the request - - - - - The number of milliseconds before the writing or reading times out. - - - - - System.Net.ICredentials to be sent with request - - - - - The System.Net.CookieContainer to be used for the request - - - - - The method to use to write the response instead of reading into RawBytes - - - - - Collection of files to be sent with request - - - - - Whether or not HTTP 3xx response redirects should be automatically followed - - - - - X509CertificateCollection to be sent with request - - - - - Maximum number of automatic redirects to follow if FollowRedirects is true - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. - - - - - HTTP headers to be sent with request - - - - - HTTP parameters (QueryString or Form values) to be sent with request - - - - - HTTP cookies to be sent with request - - - - - Request body to be sent with request - - - - - Content type of the request body. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - URL to call for this request - - - - - Flag to send authorisation header with the HttpWebRequest - - - - - Proxy info to be sent with request - - - - - Representation of an HTTP cookie - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Container for HTTP file - - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Representation of an HTTP header - - - - - Name of the header - - - - - Value of the header - - - - - Representation of an HTTP parameter (QueryString or Form value) - - - - - Name of the parameter - - - - - Value of the parameter - - - - - HTTP response data - - - - - HTTP response data - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Default constructor - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - Lazy-loaded string representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - - - - - - - - - - - - - - - - - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X509CertificateCollection to be sent with request - - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are five types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - Cookie: Adds the name/value pair to the HTTP request's Cookies collection - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container for data sent back from API - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exceptions thrown during the request, if any. - - Will contain only network transport or framework exceptions thrown during the request. - HTTP protocol errors are handled by RestSharp and will not appear here. - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Parameter container for REST requests - - - - - Return a human-readable representation of this parameter - - String - - - - Name of the parameter - - - - - Value of the parameter - - - - - Type of the parameter - - - - - Client to translate RestRequests into Http requests and process response result - - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes the request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Default constructor that registers default content handlers - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Registers a content handler to process response content - - MIME content type of the response content - Deserializer to use to process content - - - - Remove a content handler for the specified MIME content type - - MIME content type to remove - - - - Remove all content handlers - - - - - Retrieve the handler for the specified MIME content type - - MIME content type to retrieve - IDeserializer instance - - - - Assembles URL to call based on parameters, method and resource - - RestRequest to execute - Assembled System.Uri - - - - Executes the specified request and downloads the response data - - Request to execute - Response data - - - - Executes the request and returns a response, authenticating if needed - - Request to be executed - RestResponse - - - - Executes the specified request and deserializes the response content using the appropriate content handler - - Target deserialization type - Request to execute - RestResponse[[T]] with deserialized data in Data property - - - - Parameters included with every request made with this instance of RestClient - If specified in both client and request, the request wins - - - - - Maximum number of redirects to follow if FollowRedirects is true - - - - - X509CertificateCollection to be sent with request - - - - - Proxy to use for requests made by this client instance. - Passed on to underlying WebRequest if set. - - - - - Default is true. Determine whether or not requests that result in - HTTP status codes of 3xx should follow returned redirect - - - - - The CookieContainer used for requests made by this client instance - - - - - UserAgent to use for requests made by this client instance - - - - - Timeout in milliseconds to use for requests made by this client instance - - - - - The number of milliseconds before the writing or reading times out. - - - - - Whether to invoke async callbacks using the SynchronizationContext.Current captured when invoked - - - - - Authenticator to use for requests made by this client instance - - - - - Combined with Request.Resource to construct URL for request - Should include scheme and domain without trailing slash. - - - client.BaseUrl = new Uri("http://example.com"); - - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Request to be executed - Callback function to be executed upon completion - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Target deserialization type - Request to be executed - Callback function to be executed upon completion providing access to the async handle - - - - Add a parameter to use on every request made with this client instance - - The IRestClient instance - Parameter to add - - - - - Removes a parameter from the default parameters that are used on every request made with this client instance - - The IRestClient instance - The name of the parameter that needs to be removed - - - - - Adds a HTTP parameter (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - Used on every request made by this client instance - - The IRestClient instance - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - The IRestClient instance - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddDefaultParameter(name, value, HttpHeader) overload - - The IRestClient instance - Name of the header to add - Value of the header to add - - - - - Shortcut to AddDefaultParameter(name, value, UrlSegment) overload - - The IRestClient instance - Name of the segment to add - Value of the segment to add - - - - - Container for data used to make requests - - - - - Default constructor - - - - - Sets Method property to value of method - - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Internal Method so that RestClient can increase the number of attempts - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - A function to run prior to deserializing starting (e.g. change settings if error encountered) - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Gets or sets a user-defined state object that contains information about a request and which can be later - retrieved when the request completes. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Base class for common properties shared by RestResponse and RestResponse[[T]] - - - - - Default constructor - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - The exception thrown during the request, if any - - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Container for data sent back from API - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Encoding for serialized content - - - - - Need to subclass StringWriter in order to override Encoding - - - - - Default JSON serializer for request bodies - Doesn't currently use the SerializeAs attribute, defers to Newtonsoft's attributes - - - - - Default serializer - - - - - Serialize the object as JSON - - Object to serialize - JSON as String - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Content type for serialized content - - - - - Allows control how class and property names and values are serialized by XmlSerializer - Currently not supported with the JsonSerializer - When specified at the property level the class-level specification is overridden - - - - - Called by the attribute when NameStyle is speficied - - The string to transform - String - - - - The name to use for the serialized element - - - - - Sets the value to be serialized as an Attribute instead of an Element - - - - - The culture to use when serializing - - - - - Transforms the casing of the name based on the selected value. - - - - - The order to serialize the element. Default is int.MaxValue. - - - - - Options for transforming casing of element names - - - - - Default XML Serializer - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Helper methods for validating required values - - - - - Require a parameter to not be null - - Name of the parameter - Value of the parameter - - - - Represents the json array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The capacity of the json array. - - - - The json representation of the array. - - The json representation of the array. - - - - Represents the json object. - - - - - The internal member dictionary. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The implementation to use when comparing keys, or null to use the default for the type of the key. - - - - Adds the specified key. - - The key. - The value. - - - - Determines whether the specified key contains key. - - The key. - - true if the specified key contains key; otherwise, false. - - - - - Removes the specified key. - - The key. - - - - - Tries the get value. - - The key. - The value. - - - - - Adds the specified item. - - The item. - - - - Clears this instance. - - - - - Determines whether [contains] [the specified item]. - - The item. - - true if [contains] [the specified item]; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the specified item. - - The item. - - - - - Gets the enumerator. - - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns a json that represents the current . - - - A json that represents the current . - - - - - Gets the at the specified index. - - - - - - Gets the keys. - - The keys. - - - - Gets the values. - - The values. - - - - Gets or sets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - - - - Try parsing the json string into a value. - - - A JSON string. - - - The object. - - - Returns true if successfull otherwise false. - - - - - Converts a IDictionary<string,object> / IList<object> object into a JSON string - - A IDictionary<string,object> / IList<object> - Serializer strategy to use - A JSON encoded string, or null if object 'json' is not serializable - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Helper methods for validating values - - - - - Validate an integer value is between the specified values (exclusive of min/max) - - Value to validate - Exclusive minimum value - Exclusive maximum value - - - - Validate a string length - - String to be validated - Maximum length of the string - - - diff --git a/RestSharp.105.0.1/lib/net4/RestSharp.dll b/RestSharp.105.0.1/lib/net4/RestSharp.dll deleted file mode 100644 index ea01262..0000000 Binary files a/RestSharp.105.0.1/lib/net4/RestSharp.dll and /dev/null differ diff --git a/RestSharp.105.0.1/lib/net4/RestSharp.xml b/RestSharp.105.0.1/lib/net4/RestSharp.xml deleted file mode 100644 index 27a71c7..0000000 --- a/RestSharp.105.0.1/lib/net4/RestSharp.xml +++ /dev/null @@ -1,3024 +0,0 @@ - - - - RestSharp - - - - - Tries to Authenticate with the credentials of the currently logged in user, or impersonate a user - - - - - Authenticate with the credentials of the currently logged in user - - - - - Authenticate by impersonation - - - - - - - Authenticate by impersonation, using an existing ICredentials instance - - - - - - - - - Base class for OAuth 2 Authenticators. - - - Since there are many ways to authenticate in OAuth2, - this is used as a base class to differentiate between - other authenticators. - - Any other OAuth2 authenticators must derive from this - abstract class. - - - - - Access token to be used when authenticating. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Gets the access token. - - - - - The OAuth 2 authenticator using URI query parameter. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.2 - - - - - Initializes a new instance of the class. - - - The access token. - - - - - The OAuth 2 authenticator using the authorization request header field. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1 - - - - - Stores the Authorization header value as "[tokenType] accessToken". used for performance. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Initializes a new instance of the class. - - - The access token. - - - The token type. - - - - - All text parameters are UTF-8 encoded (per section 5.1). - - - - - - Generates a random 16-byte lowercase alphanumeric string. - - - - - - - Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT" - - - - - - - Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT" - - - A specified point in time. - - - - - The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - The value to escape. - The escaped value. - - The method is supposed to take on - RFC 3986 behavior if certain elements are present in a .config file. Even if this - actually worked (which in my experiments it doesn't), we can't rely on every - host actually having this configuration element present. - - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - - - - - - Sorts a collection of key-value pairs by name, and then value if equal, - concatenating them into a single string. This string should be encoded - prior to, or after normalization is run. - - - - - - - - Sorts a by name, and then value if equal. - - A collection of parameters to sort - A sorted parameter collection - - - - Creates a request URL suitable for making OAuth requests. - Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. - Resulting URLs must be lower case. - - - The original request URL - - - - - Creates a request elements concatentation value to send with a request. - This is also known as the signature base. - - - - The request's HTTP method type - The request URL - The request's parameters - A signature base string - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The signature base - The consumer secret - The token secret - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer secret - The token secret - - - - - A class to encapsulate OAuth authentication flow. - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - Any existing, non-OAuth query parameters desired in the request - - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - Generates a instance to pass to an - for the purpose of exchanging user credentials - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - - - - - - - - - - Allows control how class and property names and values are deserialized by XmlAttributeDeserializer - - - - - The name to use for the serialized element - - - - - Sets if the property to Deserialize is an Attribute or Element (Default: false) - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Types of parameters that can be added to requests - - - - - Data formats - - - - - HTTP method to use when making requests - - - - - Format strings for commonly-used date formats - - - - - .NET format string for ISO 8601 date format - - - - - .NET format string for roundtrip date format - - - - - Status for responses (surprised?) - - - - - Extension method overload! - - - - - Save a byte array to a file - - Bytes to save - Full path to save file to - - - - Read a stream into a byte array - - Stream to read - byte[] - - - - Copies bytes from one stream to another - - The input stream. - The output stream. - - - - Converts a byte array to a string, using its byte order mark to convert it to the right encoding. - http://www.shrinkrays.net/code-snippets/csharp/an-extension-method-for-converting-a-byte-array-to-a-string.aspx - - An array of bytes to convert - The byte as a string. - - - - Decodes an HTML-encoded string and returns the decoded string. - - The HTML string to decode. - The decoded text. - - - - Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream. - - The HTML string to decode - The TextWriter output stream containing the decoded string. - - - - HTML-encodes a string and sends the resulting output to a TextWriter output stream. - - The string to encode. - The TextWriter output stream containing the encoded string. - - - - Reflection extensions - - - - - Retrieve an attribute from a member (property) - - Type of attribute to retrieve - Member to retrieve attribute from - - - - - Retrieve an attribute from a type - - Type of attribute to retrieve - Type to retrieve attribute from - - - - - Checks a type to see if it derives from a raw generic (e.g. List[[]]) - - - - - - - - Find a value from a System.Enum by trying several possible variants - of the string value of the enum. - - Type of enum - Value for which to search - The culture used to calculate the name variants - - - - - Convert a to a instance. - - The response status. - - responseStatus - - - - Uses Uri.EscapeDataString() based on recommendations on MSDN - http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx - - - - - Check that a string is not null or empty - - String to check - bool - - - - Remove underscores from a string - - String to process - string - - - - Parses most common JSON date formats - - JSON value to parse - - DateTime - - - - Remove leading and trailing " from a string - - String to parse - String - - - - Checks a string to see if it matches a regex - - String to check - Pattern to match - bool - - - - Converts a string to pascal case - - String to convert - - string - - - - Converts a string to pascal case with the option to remove underscores - - String to convert - Option to remove underscores - - - - - - Converts a string to camel case - - String to convert - - String - - - - Convert the first letter of a string to lower case - - String to convert - string - - - - Checks to see if a string is all uppper case - - String to check - bool - - - - Add underscores to a pascal-cased string - - String to convert - string - - - - Add dashes to a pascal-cased string - - String to convert - string - - - - Add an undescore prefix to a pascasl-cased string - - - - - - - Add spaces to a pascal-cased string - - String to convert - string - - - - Return possible variants of a name for name matching. - - String to convert - The culture to use for conversion - IEnumerable<string> - - - - XML Extension Methods - - - - - Returns the name of an element with the namespace if specified - - Element name - XML Namespace - - - - - Container for files to be uploaded with requests - - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The content type to use in the request. - The - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The using the default content type. - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - HttpWebRequest wrapper (async methods) - - - HttpWebRequest wrapper - - - HttpWebRequest wrapper (sync methods) - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - Execute an async POST-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Execute an async GET-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Creates an IHttp - - - - - - Default constructor - - - - - Execute a POST request - - - - - Execute a PUT request - - - - - Execute a GET request - - - - - Execute a HEAD request - - - - - Execute an OPTIONS request - - - - - Execute a DELETE request - - - - - Execute a PATCH request - - - - - Execute a MERGE request - - - - - Execute a GET-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - Execute a POST-style request with the specified HTTP Method. - - The HTTP method to execute. - - - - - True if this HTTP request has any HTTP parameters - - - - - True if this HTTP request has any HTTP cookies - - - - - True if a request body has been specified - - - - - True if files have been set to be uploaded - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - UserAgent to be sent with request - - - - - Timeout in milliseconds to be used for the request - - - - - The number of milliseconds before the writing or reading times out. - - - - - System.Net.ICredentials to be sent with request - - - - - The System.Net.CookieContainer to be used for the request - - - - - The method to use to write the response instead of reading into RawBytes - - - - - Collection of files to be sent with request - - - - - Whether or not HTTP 3xx response redirects should be automatically followed - - - - - X509CertificateCollection to be sent with request - - - - - Maximum number of automatic redirects to follow if FollowRedirects is true - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. - - - - - HTTP headers to be sent with request - - - - - HTTP parameters (QueryString or Form values) to be sent with request - - - - - HTTP cookies to be sent with request - - - - - Request body to be sent with request - - - - - Content type of the request body. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - URL to call for this request - - - - - Flag to send authorisation header with the HttpWebRequest - - - - - Proxy info to be sent with request - - - - - Representation of an HTTP cookie - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Container for HTTP file - - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Representation of an HTTP header - - - - - Name of the header - - - - - Value of the header - - - - - Representation of an HTTP parameter (QueryString or Form value) - - - - - Name of the parameter - - - - - Value of the parameter - - - - - HTTP response data - - - - - HTTP response data - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Default constructor - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - Lazy-loaded string representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - - - - - - - - - - - - - - - - - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X509CertificateCollection to be sent with request - - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are five types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - Cookie: Adds the name/value pair to the HTTP request's Cookies collection - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container for data sent back from API - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exceptions thrown during the request, if any. - - Will contain only network transport or framework exceptions thrown during the request. - HTTP protocol errors are handled by RestSharp and will not appear here. - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Parameter container for REST requests - - - - - Return a human-readable representation of this parameter - - String - - - - Name of the parameter - - - - - Value of the parameter - - - - - Type of the parameter - - - - - Client to translate RestRequests into Http requests and process response result - - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a GET-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes a POST-style request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - - - - Executes the request asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a GET-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - - - - Executes a POST-style asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Executes the request asynchronously, authenticating if needed - - Request to be executed - The cancellation token - - - - Default constructor that registers default content handlers - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Registers a content handler to process response content - - MIME content type of the response content - Deserializer to use to process content - - - - Remove a content handler for the specified MIME content type - - MIME content type to remove - - - - Remove all content handlers - - - - - Retrieve the handler for the specified MIME content type - - MIME content type to retrieve - IDeserializer instance - - - - Assembles URL to call based on parameters, method and resource - - RestRequest to execute - Assembled System.Uri - - - - Executes the specified request and downloads the response data - - Request to execute - Response data - - - - Executes the request and returns a response, authenticating if needed - - Request to be executed - RestResponse - - - - Executes the specified request and deserializes the response content using the appropriate content handler - - Target deserialization type - Request to execute - RestResponse[[T]] with deserialized data in Data property - - - - Parameters included with every request made with this instance of RestClient - If specified in both client and request, the request wins - - - - - Maximum number of redirects to follow if FollowRedirects is true - - - - - X509CertificateCollection to be sent with request - - - - - Proxy to use for requests made by this client instance. - Passed on to underlying WebRequest if set. - - - - - Default is true. Determine whether or not requests that result in - HTTP status codes of 3xx should follow returned redirect - - - - - The CookieContainer used for requests made by this client instance - - - - - UserAgent to use for requests made by this client instance - - - - - Timeout in milliseconds to use for requests made by this client instance - - - - - The number of milliseconds before the writing or reading times out. - - - - - Whether to invoke async callbacks using the SynchronizationContext.Current captured when invoked - - - - - Authenticator to use for requests made by this client instance - - - - - Combined with Request.Resource to construct URL for request - Should include scheme and domain without trailing slash. - - - client.BaseUrl = new Uri("http://example.com"); - - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Request to be executed - Callback function to be executed upon completion - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Target deserialization type - Request to be executed - Callback function to be executed upon completion providing access to the async handle - - - - Add a parameter to use on every request made with this client instance - - The IRestClient instance - Parameter to add - - - - - Removes a parameter from the default parameters that are used on every request made with this client instance - - The IRestClient instance - The name of the parameter that needs to be removed - - - - - Adds a HTTP parameter (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - Used on every request made by this client instance - - The IRestClient instance - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - The IRestClient instance - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddDefaultParameter(name, value, HttpHeader) overload - - The IRestClient instance - Name of the header to add - Value of the header to add - - - - - Shortcut to AddDefaultParameter(name, value, UrlSegment) overload - - The IRestClient instance - Name of the segment to add - Value of the segment to add - - - - - Container for data used to make requests - - - - - Default constructor - - - - - Sets Method property to value of method - - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Internal Method so that RestClient can increase the number of attempts - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - A function to run prior to deserializing starting (e.g. change settings if error encountered) - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Gets or sets a user-defined state object that contains information about a request and which can be later - retrieved when the request completes. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Base class for common properties shared by RestResponse and RestResponse[[T]] - - - - - Default constructor - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - The exception thrown during the request, if any - - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Container for data sent back from API - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Encoding for serialized content - - - - - Need to subclass StringWriter in order to override Encoding - - - - - Default JSON serializer for request bodies - Doesn't currently use the SerializeAs attribute, defers to Newtonsoft's attributes - - - - - Default serializer - - - - - Serialize the object as JSON - - Object to serialize - JSON as String - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Content type for serialized content - - - - - Allows control how class and property names and values are serialized by XmlSerializer - Currently not supported with the JsonSerializer - When specified at the property level the class-level specification is overridden - - - - - Called by the attribute when NameStyle is speficied - - The string to transform - String - - - - The name to use for the serialized element - - - - - Sets the value to be serialized as an Attribute instead of an Element - - - - - The culture to use when serializing - - - - - Transforms the casing of the name based on the selected value. - - - - - The order to serialize the element. Default is int.MaxValue. - - - - - Options for transforming casing of element names - - - - - Default XML Serializer - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Helper methods for validating required values - - - - - Require a parameter to not be null - - Name of the parameter - Value of the parameter - - - - Represents the json array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The capacity of the json array. - - - - The json representation of the array. - - The json representation of the array. - - - - Represents the json object. - - - - - The internal member dictionary. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The implementation to use when comparing keys, or null to use the default for the type of the key. - - - - Adds the specified key. - - The key. - The value. - - - - Determines whether the specified key contains key. - - The key. - - true if the specified key contains key; otherwise, false. - - - - - Removes the specified key. - - The key. - - - - - Tries the get value. - - The key. - The value. - - - - - Adds the specified item. - - The item. - - - - Clears this instance. - - - - - Determines whether [contains] [the specified item]. - - The item. - - true if [contains] [the specified item]; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the specified item. - - The item. - - - - - Gets the enumerator. - - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns a json that represents the current . - - - A json that represents the current . - - - - - Gets the at the specified index. - - - - - - Gets the keys. - - The keys. - - - - Gets the values. - - The values. - - - - Gets or sets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - - - - Try parsing the json string into a value. - - - A JSON string. - - - The object. - - - Returns true if successfull otherwise false. - - - - - Converts a IDictionary<string,object> / IList<object> object into a JSON string - - A IDictionary<string,object> / IList<object> - Serializer strategy to use - A JSON encoded string, or null if object 'json' is not serializable - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Helper methods for validating values - - - - - Validate an integer value is between the specified values (exclusive of min/max) - - Value to validate - Exclusive minimum value - Exclusive maximum value - - - - Validate a string length - - String to be validated - Maximum length of the string - - - diff --git a/RestSharp.105.0.1/lib/sl4-wp71/RestSharp.WindowsPhone.dll b/RestSharp.105.0.1/lib/sl4-wp71/RestSharp.WindowsPhone.dll deleted file mode 100644 index b007212..0000000 Binary files a/RestSharp.105.0.1/lib/sl4-wp71/RestSharp.WindowsPhone.dll and /dev/null differ diff --git a/RestSharp.105.0.1/lib/sl4-wp71/RestSharp.WindowsPhone.xml b/RestSharp.105.0.1/lib/sl4-wp71/RestSharp.WindowsPhone.xml deleted file mode 100644 index 849296f..0000000 --- a/RestSharp.105.0.1/lib/sl4-wp71/RestSharp.WindowsPhone.xml +++ /dev/null @@ -1,3726 +0,0 @@ - - - - RestSharp.WindowsPhone - - - - - - - - Base class for OAuth 2 Authenticators. - - - Since there are many ways to authenticate in OAuth2, - this is used as a base class to differentiate between - other authenticators. - - Any other OAuth2 authenticators must derive from this - abstract class. - - - - - Access token to be used when authenticating. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Gets the access token. - - - - - The OAuth 2 authenticator using URI query parameter. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.2 - - - - - Initializes a new instance of the class. - - - The access token. - - - - - The OAuth 2 authenticator using the authorization request header field. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1 - - - - - Stores the Authorization header value as "[tokenType] accessToken". used for performance. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Initializes a new instance of the class. - - - The access token. - - - The token type. - - - - - All text parameters are UTF-8 encoded (per section 5.1). - - - - - - Generates a random 16-byte lowercase alphanumeric string. - - - - - - - Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT" - - - - - - - Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT" - - - A specified point in time. - - - - - The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - The value to escape. - The escaped value. - - The method is supposed to take on - RFC 3986 behavior if certain elements are present in a .config file. Even if this - actually worked (which in my experiments it doesn't), we can't rely on every - host actually having this configuration element present. - - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - - - - - - Sorts a collection of key-value pairs by name, and then value if equal, - concatenating them into a single string. This string should be encoded - prior to, or after normalization is run. - - - - - - - - Sorts a by name, and then value if equal. - - A collection of parameters to sort - A sorted parameter collection - - - - Creates a request URL suitable for making OAuth requests. - Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. - Resulting URLs must be lower case. - - - The original request URL - - - - - Creates a request elements concatentation value to send with a request. - This is also known as the signature base. - - - - The request's HTTP method type - The request URL - The request's parameters - A signature base string - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The signature base - The consumer secret - The token secret - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer secret - The token secret - - - - - A class to encapsulate OAuth authentication flow. - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - Any existing, non-OAuth query parameters desired in the request - - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - Generates a instance to pass to an - for the purpose of exchanging user credentials - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - - - - - - - - - - Calculates a 32bit Cyclic Redundancy Checksum (CRC) using the same polynomial - used by Zip. This type is used internally by DotNetZip; it is generally not used - directly by applications wishing to create, read, or manipulate zip archive - files. - - - - - Returns the CRC32 for the specified stream. - - The stream over which to calculate the CRC32 - the CRC32 calculation - - - - Returns the CRC32 for the specified stream, and writes the input into the - output stream. - - The stream over which to calculate the CRC32 - The stream into which to deflate the input - the CRC32 calculation - - - - Get the CRC32 for the given (word,byte) combo. This is a computation - defined by PKzip. - - The word to start with. - The byte to combine it with. - The CRC-ized result. - - - - Update the value for the running CRC32 using the given block of bytes. - This is useful when using the CRC32() class in a Stream. - - block of bytes to slurp - starting point in the block - how many bytes within the block to slurp - - - - indicates the total number of bytes read on the CRC stream. - This is used when writing the ZipDirEntry when compressing files. - - - - - Indicates the current CRC for all blocks slurped in. - - - - - A Stream that calculates a CRC32 (a checksum) on all bytes read, - or on all bytes written. - - - - - This class can be used to verify the CRC of a ZipEntry when - reading from a stream, or to calculate a CRC when writing to a - stream. The stream should be used to either read, or write, but - not both. If you intermix reads and writes, the results are not - defined. - - - - This class is intended primarily for use internally by the - DotNetZip library. - - - - - - The default constructor. - - - Instances returned from this constructor will leave the underlying stream - open upon Close(). - - The underlying stream - - - - The constructor allows the caller to specify how to handle the underlying - stream at close. - - The underlying stream - true to leave the underlying stream - open upon close of the CrcCalculatorStream.; false otherwise. - - - - A constructor allowing the specification of the length of the stream to read. - - - Instances returned from this constructor will leave the underlying stream open - upon Close(). - - The underlying stream - The length of the stream to slurp - - - - A constructor allowing the specification of the length of the stream to - read, as well as whether to keep the underlying stream open upon Close(). - - The underlying stream - The length of the stream to slurp - true to leave the underlying stream - open upon close of the CrcCalculatorStream.; false otherwise. - - - - Read from the stream - - the buffer to read - the offset at which to start - the number of bytes to read - the number of bytes actually read - - - - Write to the stream. - - the buffer from which to write - the offset at which to start writing - the number of bytes to write - - - - Flush the stream. - - - - - Not implemented. - - N/A - N/A - N/A - - - - Not implemented. - - N/A - - - - Closes the stream. - - - - - Gets the total number of bytes run through the CRC32 calculator. - - - - This is either the total number of bytes read, or the total number of bytes - written, depending on the direction of this stream. - - - - - Provides the current CRC for all blocks slurped in. - - - - - Indicates whether the underlying stream will be left open when the - CrcCalculatorStream is Closed. - - - - - Indicates whether the stream supports reading. - - - - - Indicates whether the stream supports seeking. - - - - - Indicates whether the stream supports writing. - - - - - Not implemented. - - - - - Not implemented. - - - - - Describes how to flush the current deflate operation. - - - The different FlushType values are useful when using a Deflate in a streaming application. - - - - No flush at all. - - - Closes the current block, but doesn't flush it to - the output. Used internally only in hypothetical - scenarios. This was supposed to be removed by Zlib, but it is - still in use in some edge cases. - - - - - Use this during compression to specify that all pending output should be - flushed to the output buffer and the output should be aligned on a byte - boundary. You might use this in a streaming communication scenario, so that - the decompressor can get all input data available so far. When using this - with a ZlibCodec, AvailableBytesIn will be zero after the call if - enough output space has been provided before the call. Flushing will - degrade compression and so it should be used only when necessary. - - - - - Use this during compression to specify that all output should be flushed, as - with FlushType.Sync, but also, the compression state should be reset - so that decompression can restart from this point if previous compressed - data has been damaged or if random access is desired. Using - FlushType.Full too often can significantly degrade the compression. - - - - Signals the end of the compression/decompression stream. - - - - A class for compressing and decompressing GZIP streams. - - - - - The GZipStream is a Decorator on a . It adds GZIP compression or decompression to any stream. - - - Like the Compression.GZipStream in the .NET Base - Class Library, the Ionic.Zlib.GZipStream can compress while writing, or decompress - while reading, but not vice versa. The compression method used is GZIP, which is - documented in IETF RFC 1952, - "GZIP file format specification version 4.3". - - A GZipStream can be used to decompress data (through Read()) or to compress - data (through Write()), but not both. - - If you wish to use the GZipStream to compress data, you must wrap it around a - write-able stream. As you call Write() on the GZipStream, the data will be - compressed into the GZIP format. If you want to decompress data, you must wrap the - GZipStream around a readable stream that contains an IETF RFC 1952-compliant stream. - The data will be decompressed as you call Read() on the GZipStream. - - Though the GZIP format allows data from multiple files to be concatenated - together, this stream handles only a single segment of GZIP format, typically - representing a single file. - - - This class is similar to and . - ZlibStream handles RFC1950-compliant streams. - handles RFC1951-compliant streams. This class handles RFC1952-compliant streams. - - - - - - - - - - The last modified time for the GZIP stream. - - - GZIP allows the storage of a last modified time with each GZIP entry. - When compressing data, you can set this before the first call to Write(). When - decompressing, you can retrieve this value any time after the first call to - Read(). - - - - Create a GZipStream using the specified CompressionMode and the specified CompressionLevel, - and explicitly specify whether the stream should be left open after Deflation or Inflation. - - - - This constructor allows the application to request that the captive stream remain open after - the deflation or inflation occurs. By default, after Close() is called on the stream, the - captive stream is also closed. In some cases this is not desired, for example if the stream - is a memory stream that will be re-read after compressed data has been written to it. Specify true for the - leaveOpen parameter to leave the stream open. - - - As noted in the class documentation, - the CompressionMode (Compress or Decompress) also establishes the "direction" of the stream. - A GZipStream with CompressionMode.Compress works only through Write(). A GZipStream with - CompressionMode.Decompress works only through Read(). - - - - This example shows how to use a DeflateStream to compress data. - - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (var raw = System.IO.File.Create(outputFile)) - { - using (Stream compressor = new GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression, true)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - } - - - Dim outputFile As String = (fileToCompress & ".compressed") - Using input As Stream = File.OpenRead(fileToCompress) - Using raw As FileStream = File.Create(outputFile) - Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression, True) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - End Using - - - The stream which will be read or written. - Indicates whether the GZipStream will compress or decompress. - true if the application would like the stream to remain open after inflation/deflation. - A tuning knob to trade speed for effectiveness. - - - - Dispose the stream. - - - This may or may not result in a Close() call on the captive stream. - See the ctor's with leaveOpen parameters for more information. - - - - - Flush the stream. - - - - - Read and decompress data from the source stream. - - - With a GZipStream, decompression is done through reading. - - - - byte[] working = new byte[WORKING_BUFFER_SIZE]; - using (System.IO.Stream input = System.IO.File.OpenRead(_CompressedFile)) - { - using (Stream decompressor= new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, true)) - { - using (var output = System.IO.File.Create(_DecompressedFile)) - { - int n; - while ((n= decompressor.Read(working, 0, working.Length)) !=0) - { - output.Write(working, 0, n); - } - } - } - } - - - The buffer into which the decompressed data should be placed. - the offset within that data array to put the first byte read. - the number of bytes to read. - the number of bytes actually read - - - - Calling this method always throws a . - - irrelevant; it will always throw! - irrelevant; it will always throw! - irrelevant! - - - - Calling this method always throws a NotImplementedException. - - irrelevant; this method will always throw! - - - - The Comment on the GZIP stream. - - - - The GZIP format allows for each file to optionally have an associated comment stored with the - file. The comment is encoded with the ISO-8859-1 code page. To include a comment in - a GZIP stream you create, set this property before calling Write() for the first time - on the GZipStream. - - - - When using GZipStream to decompress, you can retrieve this property after the first - call to Read(). If no comment has been set in the GZIP bytestream, the Comment - property will return null (Nothing in VB). - - - - - - The FileName for the GZIP stream. - - - - The GZIP format optionally allows each file to have an associated filename. When - compressing data (through Write()), set this FileName before calling Write() the first - time on the GZipStream. The actual filename is encoded into the GZIP bytestream with - the ISO-8859-1 code page, according to RFC 1952. It is the application's responsibility to - insure that the FileName can be encoded and decoded correctly with this code page. - - - When decompressing (through Read()), you can retrieve this value any time after the - first Read(). In the case where there was no filename encoded into the GZIP - bytestream, the property will return null (Nothing in VB). - - - - - - The CRC on the GZIP stream. - - - This is used for internal error checking. You probably don't need to look at this property. - - - - - This property sets the flush behavior on the stream. - - - - - The size of the working buffer for the compression codec. - - - - - The working buffer is used for all stream operations. The default size is 1024 bytes. - The minimum size is 128 bytes. You may get better performance with a larger buffer. - Then again, you might not. You would have to test it. - - - - Set this before the first call to Read() or Write() on the stream. If you try to set it - afterwards, it will throw. - - - - - Returns the total number of bytes input so far. - - - Returns the total number of bytes output so far. - - - - Indicates whether the stream can be read. - - - The return value depends on whether the captive stream supports reading. - - - - - Indicates whether the stream supports Seek operations. - - - Always returns false. - - - - - Indicates whether the stream can be written. - - - The return value depends on whether the captive stream supports writing. - - - - - Reading this property always throws a NotImplementedException. - - - - - The position of the stream pointer. - - - Writing this property always throws a NotImplementedException. Reading will - return the total bytes written out, if used in writing, or the total bytes - read in, if used in reading. The count may refer to compressed bytes or - uncompressed bytes, depending on how you've used the stream. - - - - - A general purpose exception class for exceptions in the Zlib library. - - - - - The ZlibException class captures exception information generated - by the Zlib library. - - - - - This ctor collects a message attached to the exception. - - - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index. - The source TextReader to read from - Contains the array of characteres read from the source TextReader. - The starting index of the target array. - The maximum number of characters to read from the source TextReader. - The number of characters read. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the end of the stream is reached. - - - - Computes an Adler-32 checksum. - - - The Adler checksum is similar to a CRC checksum, but faster to compute, though less - reliable. It is used in producing RFC1950 compressed streams. The Adler checksum - is a required part of the "ZLIB" standard. Applications will almost never need to - use this class directly. - - - - - Encoder and Decoder for ZLIB and DEFLATE (IETF RFC1950 and RFC1951). - - - - This class compresses and decompresses data according to the Deflate algorithm - and optionally, the ZLIB format, as documented in RFC 1950 - ZLIB and RFC 1951 - DEFLATE. - - - - - The buffer from which data is taken. - - - - - An index into the InputBuffer array, indicating where to start reading. - - - - - The number of bytes available in the InputBuffer, starting at NextIn. - - - Generally you should set this to InputBuffer.Length before the first Inflate() or Deflate() call. - The class will update this number as calls to Inflate/Deflate are made. - - - - - Total number of bytes read so far, through all calls to Inflate()/Deflate(). - - - - - Buffer to store output data. - - - - - An index into the OutputBuffer array, indicating where to start writing. - - - - - The number of bytes available in the OutputBuffer, starting at NextOut. - - - Generally you should set this to OutputBuffer.Length before the first Inflate() or Deflate() call. - The class will update this number as calls to Inflate/Deflate are made. - - - - - Total number of bytes written to the output so far, through all calls to Inflate()/Deflate(). - - - - - used for diagnostics, when something goes wrong! - - - - - The number of Window Bits to use. - - - This gauges the size of the sliding window, and hence the - compression effectiveness as well as memory consumption. It's best to just leave this - setting alone if you don't know what it is. The maximum value is 15 bits, which implies - a 32k window. - - - - - Create a ZlibCodec that decompresses. - - - - - Initialize the inflation state. - - - It is not necessary to call this before using the ZlibCodec to inflate data; - It is implicitly called when you call the constructor. - - Z_OK if everything goes well. - - - - Initialize the inflation state with an explicit flag to - govern the handling of RFC1950 header bytes. - - - - By default, the ZLIB header defined in RFC 1950 is expected. If - you want to read a zlib stream you should specify true for - expectRfc1950Header. If you have a deflate stream, you will want to specify - false. It is only necessary to invoke this initializer explicitly if you - want to specify false. - - - whether to expect an RFC1950 header byte - pair when reading the stream of data to be inflated. - - Z_OK if everything goes well. - - - - Initialize the ZlibCodec for inflation, with the specified number of window bits. - - The number of window bits to use. If you need to ask what that is, - then you shouldn't be calling this initializer. - Z_OK if all goes well. - - - - Initialize the inflation state with an explicit flag to govern the handling of - RFC1950 header bytes. - - - - If you want to read a zlib stream you should specify true for - expectRfc1950Header. In this case, the library will expect to find a ZLIB - header, as defined in RFC - 1950, in the compressed stream. If you will be reading a DEFLATE or - GZIP stream, which does not have such a header, you will want to specify - false. - - - whether to expect an RFC1950 header byte pair when reading - the stream of data to be inflated. - The number of window bits to use. If you need to ask what that is, - then you shouldn't be calling this initializer. - Z_OK if everything goes well. - - - - Inflate the data in the InputBuffer, placing the result in the OutputBuffer. - - - You must have set InputBuffer and OutputBuffer, NextIn and NextOut, and AvailableBytesIn and - AvailableBytesOut before calling this method. - - - - private void InflateBuffer() - { - int bufferSize = 1024; - byte[] buffer = new byte[bufferSize]; - ZlibCodec decompressor = new ZlibCodec(); - - Console.WriteLine("\n============================================"); - Console.WriteLine("Size of Buffer to Inflate: {0} bytes.", CompressedBytes.Length); - MemoryStream ms = new MemoryStream(DecompressedBytes); - - int rc = decompressor.InitializeInflate(); - - decompressor.InputBuffer = CompressedBytes; - decompressor.NextIn = 0; - decompressor.AvailableBytesIn = CompressedBytes.Length; - - decompressor.OutputBuffer = buffer; - - // pass 1: inflate - do - { - decompressor.NextOut = 0; - decompressor.AvailableBytesOut = buffer.Length; - rc = decompressor.Inflate(ZlibConstants.Z_NO_FLUSH); - - if (rc != ZlibConstants.Z_OK && rc != ZlibConstants.Z_STREAM_END) - throw new Exception("inflating: " + decompressor.Message); - - ms.Write(decompressor.OutputBuffer, 0, buffer.Length - decompressor.AvailableBytesOut); - } - while (decompressor.AvailableBytesIn > 0 || decompressor.AvailableBytesOut == 0); - - // pass 2: finish and flush - do - { - decompressor.NextOut = 0; - decompressor.AvailableBytesOut = buffer.Length; - rc = decompressor.Inflate(ZlibConstants.Z_FINISH); - - if (rc != ZlibConstants.Z_STREAM_END && rc != ZlibConstants.Z_OK) - throw new Exception("inflating: " + decompressor.Message); - - if (buffer.Length - decompressor.AvailableBytesOut > 0) - ms.Write(buffer, 0, buffer.Length - decompressor.AvailableBytesOut); - } - while (decompressor.AvailableBytesIn > 0 || decompressor.AvailableBytesOut == 0); - - decompressor.EndInflate(); - } - - - - The flush to use when inflating. - Z_OK if everything goes well. - - - - Ends an inflation session. - - - Call this after successively calling Inflate(). This will cause all buffers to be flushed. - After calling this you cannot call Inflate() without a intervening call to one of the - InitializeInflate() overloads. - - Z_OK if everything goes well. - - - - I don't know what this does! - - Z_OK if everything goes well. - - - - Set the dictionary to be used for either Inflation or Deflation. - - The dictionary bytes to use. - Z_OK if all goes well. - - - - The Adler32 checksum on the data transferred through the codec so far. You probably don't need to look at this. - - - - - A bunch of constants used in the Zlib interface. - - - - - The maximum number of window bits for the Deflate algorithm. - - - - - The default number of window bits for the Deflate algorithm. - - - - - indicates everything is A-OK - - - - - Indicates that the last operation reached the end of the stream. - - - - - The operation ended in need of a dictionary. - - - - - There was an error with the stream - not enough data, not open and readable, etc. - - - - - There was an error with the data - not enough data, bad data, etc. - - - - - There was an error with the working buffer. - - - - - The size of the working buffer used in the ZlibCodec class. Defaults to 8192 bytes. - - - - - The minimum size of the working buffer used in the ZlibCodec class. Currently it is 128 bytes. - - - - - Represents a Zlib stream for compression or decompression. - - - - - The ZlibStream is a Decorator on a . It adds ZLIB compression or decompression to any - stream. - - - Using this stream, applications can compress or decompress data via - stream Read and Write operations. Either compresssion or - decompression can occur through either reading or writing. The compression - format used is ZLIB, which is documented in IETF RFC 1950, "ZLIB Compressed - Data Format Specification version 3.3". This implementation of ZLIB always uses - DEFLATE as the compression method. (see IETF RFC 1951, "DEFLATE - Compressed Data Format Specification version 1.3.") - - - The ZLIB format allows for varying compression methods, window sizes, and dictionaries. - This implementation always uses the DEFLATE compression method, a preset dictionary, - and 15 window bits by default. - - - - This class is similar to , except that it adds the - RFC1950 header and trailer bytes to a compressed stream when compressing, or expects - the RFC1950 header and trailer bytes when decompressing. It is also similar to the - . - - - - - - - - Dispose the stream. - - - This may or may not result in a Close() call on the captive stream. - See the constructors that have a leaveOpen parameter for more information. - - - - - Flush the stream. - - - - - Read data from the stream. - - - - - - If you wish to use the ZlibStream to compress data while reading, you can create a - ZlibStream with CompressionMode.Compress, providing an uncompressed data stream. Then - call Read() on that ZlibStream, and the data read will be compressed. If you wish to - use the ZlibStream to decompress data while reading, you can create a ZlibStream with - CompressionMode.Decompress, providing a readable compressed data stream. Then call - Read() on that ZlibStream, and the data will be decompressed as it is read. - - - - A ZlibStream can be used for Read() or Write(), but not both. - - - The buffer into which the read data should be placed. - the offset within that data array to put the first byte read. - the number of bytes to read. - - - - Calling this method always throws a NotImplementedException. - - - - - Calling this method always throws a NotImplementedException. - - - - - Write data to the stream. - - - - - - If you wish to use the ZlibStream to compress data while writing, you can create a - ZlibStream with CompressionMode.Compress, and a writable output stream. Then call - Write() on that ZlibStream, providing uncompressed data as input. The data sent to - the output stream will be the compressed form of the data written. If you wish to use - the ZlibStream to decompress data while writing, you can create a ZlibStream with - CompressionMode.Decompress, and a writable output stream. Then call Write() on that - stream, providing previously compressed data. The data sent to the output stream will - be the decompressed form of the data written. - - - - A ZlibStream can be used for Read() or Write(), but not both. - - - The buffer holding data to write to the stream. - the offset within that data array to find the first byte to write. - the number of bytes to write. - - - - Uncompress a byte array into a single string. - - - - A buffer containing ZLIB-compressed data. - - - - - Uncompress a byte array into a byte array. - - - - - A buffer containing ZLIB-compressed data. - - - - - This property sets the flush behavior on the stream. - Sorry, though, not sure exactly how to describe all the various settings. - - - - - The size of the working buffer for the compression codec. - - - - - The working buffer is used for all stream operations. The default size is 1024 bytes. - The minimum size is 128 bytes. You may get better performance with a larger buffer. - Then again, you might not. You would have to test it. - - - - Set this before the first call to Read() or Write() on the stream. If you try to set it - afterwards, it will throw. - - - - - Returns the total number of bytes input so far. - - - Returns the total number of bytes output so far. - - - - Indicates whether the stream can be read. - - - The return value depends on whether the captive stream supports reading. - - - - - Indicates whether the stream supports Seek operations. - - - Always returns false. - - - - - Indicates whether the stream can be written. - - - The return value depends on whether the captive stream supports writing. - - - - - Reading this property always throws a NotImplementedException. - - - - - The position of the stream pointer. - - - Writing this property always throws a NotImplementedException. Reading will - return the total bytes written out, if used in writing, or the total bytes - read in, if used in reading. The count may refer to compressed bytes or - uncompressed bytes, depending on how you've used the stream. - - - - - Allows control how class and property names and values are deserialized by XmlAttributeDeserializer - - - - - The name to use for the serialized element - - - - - Sets if the property to Deserialize is an Attribute or Element (Default: false) - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Types of parameters that can be added to requests - - - - - Data formats - - - - - HTTP method to use when making requests - - - - - Format strings for commonly-used date formats - - - - - .NET format string for ISO 8601 date format - - - - - .NET format string for roundtrip date format - - - - - Status for responses (surprised?) - - - - - Extension method overload! - - - - - Read a stream into a byte array - - Stream to read - byte[] - - - - Copies bytes from one stream to another - - The input stream. - The output stream. - - - - Converts a byte array to a string, using its byte order mark to convert it to the right encoding. - http://www.shrinkrays.net/code-snippets/csharp/an-extension-method-for-converting-a-byte-array-to-a-string.aspx - - An array of bytes to convert - The byte as a string. - - - - Reflection extensions - - - - - Retrieve an attribute from a member (property) - - Type of attribute to retrieve - Member to retrieve attribute from - - - - - Retrieve an attribute from a type - - Type of attribute to retrieve - Type to retrieve attribute from - - - - - Checks a type to see if it derives from a raw generic (e.g. List[[]]) - - - - - - - - Find a value from a System.Enum by trying several possible variants - of the string value of the enum. - - Type of enum - Value for which to search - The culture used to calculate the name variants - - - - - Uses Uri.EscapeDataString() based on recommendations on MSDN - http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx - - - - - Check that a string is not null or empty - - String to check - bool - - - - Remove underscores from a string - - String to process - string - - - - Parses most common JSON date formats - - JSON value to parse - - DateTime - - - - Remove leading and trailing " from a string - - String to parse - String - - - - Checks a string to see if it matches a regex - - String to check - Pattern to match - bool - - - - Converts a string to pascal case - - String to convert - - string - - - - Converts a string to pascal case with the option to remove underscores - - String to convert - Option to remove underscores - - - - - - Converts a string to camel case - - String to convert - - String - - - - Convert the first letter of a string to lower case - - String to convert - string - - - - Checks to see if a string is all uppper case - - String to check - bool - - - - Add underscores to a pascal-cased string - - String to convert - string - - - - Add dashes to a pascal-cased string - - String to convert - string - - - - Add an undescore prefix to a pascasl-cased string - - - - - - - Add spaces to a pascal-cased string - - String to convert - string - - - - Return possible variants of a name for name matching. - - String to convert - The culture to use for conversion - IEnumerable<string> - - - - XML Extension Methods - - - - - Returns the name of an element with the namespace if specified - - Element name - XML Namespace - - - - - Container for files to be uploaded with requests - - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The content type to use in the request. - The - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The using the default content type. - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - HttpWebRequest wrapper (async methods) - - - HttpWebRequest wrapper - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - Execute an async POST-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Execute an async GET-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Creates an IHttp - - - - - - Default constructor - - - - - True if this HTTP request has any HTTP parameters - - - - - True if this HTTP request has any HTTP cookies - - - - - True if a request body has been specified - - - - - True if files have been set to be uploaded - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - UserAgent to be sent with request - - - - - Timeout in milliseconds to be used for the request - - - - - The number of milliseconds before the writing or reading times out. - - - - - System.Net.ICredentials to be sent with request - - - - - The System.Net.CookieContainer to be used for the request - - - - - The method to use to write the response instead of reading into RawBytes - - - - - Collection of files to be sent with request - - - - - Whether or not HTTP 3xx response redirects should be automatically followed - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. - - - - - HTTP headers to be sent with request - - - - - HTTP parameters (QueryString or Form values) to be sent with request - - - - - HTTP cookies to be sent with request - - - - - Request body to be sent with request - - - - - Content type of the request body. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - URL to call for this request - - - - - Flag to send authorisation header with the HttpWebRequest - - - - - Representation of an HTTP cookie - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Container for HTTP file - - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Representation of an HTTP header - - - - - Name of the header - - - - - Value of the header - - - - - Representation of an HTTP parameter (QueryString or Form value) - - - - - Name of the parameter - - - - - Value of the parameter - - - - - HTTP response data - - - - - HTTP response data - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Default constructor - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - Lazy-loaded string representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - - - - - - - - - - - - - - - - - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are five types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - Cookie: Adds the name/value pair to the HTTP request's Cookies collection - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container for data sent back from API - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exceptions thrown during the request, if any. - - Will contain only network transport or framework exceptions thrown during the request. - HTTP protocol errors are handled by RestSharp and will not appear here. - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Parameter container for REST requests - - - - - Return a human-readable representation of this parameter - - String - - - - Name of the parameter - - - - - Value of the parameter - - - - - Type of the parameter - - - - - Client to translate RestRequests into Http requests and process response result - - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Default constructor that registers default content handlers - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Registers a content handler to process response content - - MIME content type of the response content - Deserializer to use to process content - - - - Remove a content handler for the specified MIME content type - - MIME content type to remove - - - - Remove all content handlers - - - - - Retrieve the handler for the specified MIME content type - - MIME content type to retrieve - IDeserializer instance - - - - Assembles URL to call based on parameters, method and resource - - RestRequest to execute - Assembled System.Uri - - - - Parameters included with every request made with this instance of RestClient - If specified in both client and request, the request wins - - - - - Maximum number of redirects to follow if FollowRedirects is true - - - - - Default is true. Determine whether or not requests that result in - HTTP status codes of 3xx should follow returned redirect - - - - - The CookieContainer used for requests made by this client instance - - - - - UserAgent to use for requests made by this client instance - - - - - Timeout in milliseconds to use for requests made by this client instance - - - - - The number of milliseconds before the writing or reading times out. - - - - - Whether to invoke async callbacks using the SynchronizationContext.Current captured when invoked - - - - - Authenticator to use for requests made by this client instance - - - - - Combined with Request.Resource to construct URL for request - Should include scheme and domain without trailing slash. - - - client.BaseUrl = new Uri("http://example.com"); - - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Request to be executed - Callback function to be executed upon completion - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Target deserialization type - Request to be executed - Callback function to be executed upon completion providing access to the async handle - - - - Add a parameter to use on every request made with this client instance - - The IRestClient instance - Parameter to add - - - - - Removes a parameter from the default parameters that are used on every request made with this client instance - - The IRestClient instance - The name of the parameter that needs to be removed - - - - - Adds a HTTP parameter (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - Used on every request made by this client instance - - The IRestClient instance - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - The IRestClient instance - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddDefaultParameter(name, value, HttpHeader) overload - - The IRestClient instance - Name of the header to add - Value of the header to add - - - - - Shortcut to AddDefaultParameter(name, value, UrlSegment) overload - - The IRestClient instance - Name of the segment to add - Value of the segment to add - - - - - Container for data used to make requests - - - - - Default constructor - - - - - Sets Method property to value of method - - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Internal Method so that RestClient can increase the number of attempts - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - A function to run prior to deserializing starting (e.g. change settings if error encountered) - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Gets or sets a user-defined state object that contains information about a request and which can be later - retrieved when the request completes. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Base class for common properties shared by RestResponse and RestResponse[[T]] - - - - - Default constructor - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - The exception thrown during the request, if any - - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Container for data sent back from API - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Encoding for serialized content - - - - - Need to subclass StringWriter in order to override Encoding - - - - - Default JSON serializer for request bodies - Doesn't currently use the SerializeAs attribute, defers to Newtonsoft's attributes - - - - - Default serializer - - - - - Serialize the object as JSON - - Object to serialize - JSON as String - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Content type for serialized content - - - - - Allows control how class and property names and values are serialized by XmlSerializer - Currently not supported with the JsonSerializer - When specified at the property level the class-level specification is overridden - - - - - Called by the attribute when NameStyle is speficied - - The string to transform - String - - - - The name to use for the serialized element - - - - - Sets the value to be serialized as an Attribute instead of an Element - - - - - The culture to use when serializing - - - - - Transforms the casing of the name based on the selected value. - - - - - The order to serialize the element. Default is int.MaxValue. - - - - - Options for transforming casing of element names - - - - - Default XML Serializer - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Represents the json array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The capacity of the json array. - - - - The json representation of the array. - - The json representation of the array. - - - - Represents the json object. - - - - - The internal member dictionary. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The implementation to use when comparing keys, or null to use the default for the type of the key. - - - - Adds the specified key. - - The key. - The value. - - - - Determines whether the specified key contains key. - - The key. - - true if the specified key contains key; otherwise, false. - - - - - Removes the specified key. - - The key. - - - - - Tries the get value. - - The key. - The value. - - - - - Adds the specified item. - - The item. - - - - Clears this instance. - - - - - Determines whether [contains] [the specified item]. - - The item. - - true if [contains] [the specified item]; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the specified item. - - The item. - - - - - Gets the enumerator. - - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns a json that represents the current . - - - A json that represents the current . - - - - - Gets the at the specified index. - - - - - - Gets the keys. - - The keys. - - - - Gets the values. - - The values. - - - - Gets or sets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - - - - Try parsing the json string into a value. - - - A JSON string. - - - The object. - - - Returns true if successfull otherwise false. - - - - - Converts a IDictionary<string,object> / IList<object> object into a JSON string - - A IDictionary<string,object> / IList<object> - Serializer strategy to use - A JSON encoded string, or null if object 'json' is not serializable - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Helper methods for validating required values - - - - - Require a parameter to not be null - - Name of the parameter - Value of the parameter - - - - Helper methods for validating values - - - - - Validate an integer value is between the specified values (exclusive of min/max) - - Value to validate - Exclusive minimum value - Exclusive maximum value - - - - Validate a string length - - String to be validated - Maximum length of the string - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - diff --git a/RestSharp.105.0.1/lib/sl4/RestSharp.Silverlight.dll b/RestSharp.105.0.1/lib/sl4/RestSharp.Silverlight.dll deleted file mode 100644 index 38f85ac..0000000 Binary files a/RestSharp.105.0.1/lib/sl4/RestSharp.Silverlight.dll and /dev/null differ diff --git a/RestSharp.105.0.1/lib/sl4/RestSharp.Silverlight.xml b/RestSharp.105.0.1/lib/sl4/RestSharp.Silverlight.xml deleted file mode 100644 index 6c1cb08..0000000 --- a/RestSharp.105.0.1/lib/sl4/RestSharp.Silverlight.xml +++ /dev/null @@ -1,2661 +0,0 @@ - - - - RestSharp.Silverlight - - - - - - - - Base class for OAuth 2 Authenticators. - - - Since there are many ways to authenticate in OAuth2, - this is used as a base class to differentiate between - other authenticators. - - Any other OAuth2 authenticators must derive from this - abstract class. - - - - - Access token to be used when authenticating. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Gets the access token. - - - - - The OAuth 2 authenticator using URI query parameter. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.2 - - - - - Initializes a new instance of the class. - - - The access token. - - - - - The OAuth 2 authenticator using the authorization request header field. - - - Based on http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1 - - - - - Stores the Authorization header value as "[tokenType] accessToken". used for performance. - - - - - Initializes a new instance of the class. - - - The access token. - - - - - Initializes a new instance of the class. - - - The access token. - - - The token type. - - - - - All text parameters are UTF-8 encoded (per section 5.1). - - - - - - Generates a random 16-byte lowercase alphanumeric string. - - - - - - - Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT" - - - - - - - Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT" - - - A specified point in time. - - - - - The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - The value to escape. - The escaped value. - - The method is supposed to take on - RFC 3986 behavior if certain elements are present in a .config file. Even if this - actually worked (which in my experiments it doesn't), we can't rely on every - host actually having this configuration element present. - - - - - - - URL encodes a string based on section 5.1 of the OAuth spec. - Namely, percent encoding with [RFC3986], avoiding unreserved characters, - upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. - - - - - - - Sorts a collection of key-value pairs by name, and then value if equal, - concatenating them into a single string. This string should be encoded - prior to, or after normalization is run. - - - - - - - - Sorts a by name, and then value if equal. - - A collection of parameters to sort - A sorted parameter collection - - - - Creates a request URL suitable for making OAuth requests. - Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. - Resulting URLs must be lower case. - - - The original request URL - - - - - Creates a request elements concatentation value to send with a request. - This is also known as the signature base. - - - - The request's HTTP method type - The request URL - The request's parameters - A signature base string - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret. - This method is used when the token secret is currently unknown. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer key - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The signature base - The consumer secret - The token secret - - - - - Creates a signature value given a signature base and the consumer secret and a known token secret. - - - The hashing method - The treatment to use on a signature value - The signature base - The consumer secret - The token secret - - - - - A class to encapsulate OAuth authentication flow. - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - - - - - - Generates a instance to pass to an - for the purpose of requesting an - unauthorized request token. - - The HTTP method for the intended request - Any existing, non-OAuth query parameters desired in the request - - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - - - - Generates a instance to pass to an - for the purpose of exchanging a request token - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - Generates a instance to pass to an - for the purpose of exchanging user credentials - for an access token authorized by the user at the Service Provider site. - - The HTTP method for the intended request - - Any existing, non-OAuth query parameters desired in the request - - - - - - - - - - - - - Allows control how class and property names and values are deserialized by XmlAttributeDeserializer - - - - - The name to use for the serialized element - - - - - Sets if the property to Deserialize is an Attribute or Element (Default: false) - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Types of parameters that can be added to requests - - - - - Data formats - - - - - HTTP method to use when making requests - - - - - Format strings for commonly-used date formats - - - - - .NET format string for ISO 8601 date format - - - - - .NET format string for roundtrip date format - - - - - Status for responses (surprised?) - - - - - Extension method overload! - - - - - Save a byte array to a file - - Bytes to save - Full path to save file to - - - - Read a stream into a byte array - - Stream to read - byte[] - - - - Copies bytes from one stream to another - - The input stream. - The output stream. - - - - Converts a byte array to a string, using its byte order mark to convert it to the right encoding. - http://www.shrinkrays.net/code-snippets/csharp/an-extension-method-for-converting-a-byte-array-to-a-string.aspx - - An array of bytes to convert - The byte as a string. - - - - Reflection extensions - - - - - Retrieve an attribute from a member (property) - - Type of attribute to retrieve - Member to retrieve attribute from - - - - - Retrieve an attribute from a type - - Type of attribute to retrieve - Type to retrieve attribute from - - - - - Checks a type to see if it derives from a raw generic (e.g. List[[]]) - - - - - - - - Find a value from a System.Enum by trying several possible variants - of the string value of the enum. - - Type of enum - Value for which to search - The culture used to calculate the name variants - - - - - Uses Uri.EscapeDataString() based on recommendations on MSDN - http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx - - - - - Check that a string is not null or empty - - String to check - bool - - - - Remove underscores from a string - - String to process - string - - - - Parses most common JSON date formats - - JSON value to parse - - DateTime - - - - Remove leading and trailing " from a string - - String to parse - String - - - - Checks a string to see if it matches a regex - - String to check - Pattern to match - bool - - - - Converts a string to pascal case - - String to convert - - string - - - - Converts a string to pascal case with the option to remove underscores - - String to convert - Option to remove underscores - - - - - - Converts a string to camel case - - String to convert - - String - - - - Convert the first letter of a string to lower case - - String to convert - string - - - - Checks to see if a string is all uppper case - - String to check - bool - - - - Add underscores to a pascal-cased string - - String to convert - string - - - - Add dashes to a pascal-cased string - - String to convert - string - - - - Add an undescore prefix to a pascasl-cased string - - - - - - - Add spaces to a pascal-cased string - - String to convert - string - - - - Return possible variants of a name for name matching. - - String to convert - The culture to use for conversion - IEnumerable<string> - - - - XML Extension Methods - - - - - Returns the name of an element with the namespace if specified - - Element name - XML Namespace - - - - - Container for files to be uploaded with requests - - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The content type to use in the request. - The - - - - Creates a file parameter from an array of bytes. - - The parameter name to use in the request. - The data to use as the file's contents. - The filename to use in the request. - The using the default content type. - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - HttpWebRequest wrapper (async methods) - - - HttpWebRequest wrapper - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - Execute an async POST-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Execute an async GET-style request with the specified HTTP Method. - - - The HTTP method to execute. - - - - - Creates an IHttp - - - - - - Default constructor - - - - - True if this HTTP request has any HTTP parameters - - - - - True if this HTTP request has any HTTP cookies - - - - - True if a request body has been specified - - - - - True if files have been set to be uploaded - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - UserAgent to be sent with request - - - - - Timeout in milliseconds to be used for the request - - - - - The number of milliseconds before the writing or reading times out. - - - - - System.Net.ICredentials to be sent with request - - - - - The System.Net.CookieContainer to be used for the request - - - - - The method to use to write the response instead of reading into RawBytes - - - - - Collection of files to be sent with request - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. - - - - - HTTP headers to be sent with request - - - - - HTTP parameters (QueryString or Form values) to be sent with request - - - - - HTTP cookies to be sent with request - - - - - Request body to be sent with request - - - - - Content type of the request body. - - - - - An alternative to RequestBody, for when the caller already has the byte array. - - - - - URL to call for this request - - - - - Flag to send authorisation header with the HttpWebRequest - - - - - Representation of an HTTP cookie - - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - - Container for HTTP file - - - - - The length of data to be sent - - - - - Provides raw data for file - - - - - Name of the file to use when uploading - - - - - MIME content type of file - - - - - Name of the parameter - - - - - Representation of an HTTP header - - - - - Name of the header - - - - - Value of the header - - - - - Representation of an HTTP parameter (QueryString or Form value) - - - - - Name of the parameter - - - - - Value of the parameter - - - - - HTTP response data - - - - - HTTP response data - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - Default constructor - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - Lazy-loaded string representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Headers returned by server with the response - - - - - Cookies returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exception thrown when error is encountered. - - - - - - - - - - - - - - - - - - - - - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are five types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - Cookie: Adds the name/value pair to the HTTP request's Cookies collection - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container for data sent back from API - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - Exceptions thrown during the request, if any. - - Will contain only network transport or framework exceptions thrown during the request. - HTTP protocol errors are handled by RestSharp and will not appear here. - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Parameter container for REST requests - - - - - Return a human-readable representation of this parameter - - String - - - - Name of the parameter - - - - - Value of the parameter - - - - - Type of the parameter - - - - - Client to translate RestRequests into Http requests and process response result - - - - - Executes the request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Request to be executed - Callback function to be executed upon completion providing access to the async handle. - The HTTP method to execute - - - - Executes the request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - - - - Executes a GET-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Executes a POST-style request and callback asynchronously, authenticating if needed - - Target deserialization type - Request to be executed - Callback function to be executed upon completion - The HTTP method to execute - - - - Default constructor that registers default content handlers - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Sets the BaseUrl property for requests made by this client instance - - - - - - Registers a content handler to process response content - - MIME content type of the response content - Deserializer to use to process content - - - - Remove a content handler for the specified MIME content type - - MIME content type to remove - - - - Remove all content handlers - - - - - Retrieve the handler for the specified MIME content type - - MIME content type to retrieve - IDeserializer instance - - - - Assembles URL to call based on parameters, method and resource - - RestRequest to execute - Assembled System.Uri - - - - Parameters included with every request made with this instance of RestClient - If specified in both client and request, the request wins - - - - - Maximum number of redirects to follow if FollowRedirects is true - - - - - Default is true. Determine whether or not requests that result in - HTTP status codes of 3xx should follow returned redirect - - - - - The CookieContainer used for requests made by this client instance - - - - - UserAgent to use for requests made by this client instance - - - - - Timeout in milliseconds to use for requests made by this client instance - - - - - The number of milliseconds before the writing or reading times out. - - - - - Whether to invoke async callbacks using the SynchronizationContext.Current captured when invoked - - - - - Authenticator to use for requests made by this client instance - - - - - Combined with Request.Resource to construct URL for request - Should include scheme and domain without trailing slash. - - - client.BaseUrl = new Uri("http://example.com"); - - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Request to be executed - Callback function to be executed upon completion - - - - Executes the request and callback asynchronously, authenticating if needed - - The IRestClient this method extends - Target deserialization type - Request to be executed - Callback function to be executed upon completion providing access to the async handle - - - - Add a parameter to use on every request made with this client instance - - The IRestClient instance - Parameter to add - - - - - Removes a parameter from the default parameters that are used on every request made with this client instance - - The IRestClient instance - The name of the parameter that needs to be removed - - - - - Adds a HTTP parameter (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - Used on every request made by this client instance - - The IRestClient instance - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - The IRestClient instance - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddDefaultParameter(name, value, HttpHeader) overload - - The IRestClient instance - Name of the header to add - Value of the header to add - - - - - Shortcut to AddDefaultParameter(name, value, UrlSegment) overload - - The IRestClient instance - Name of the segment to add - Value of the segment to add - - - - - Container for data used to make requests - - - - - Default constructor - - - - - Sets Method property to value of method - - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Sets Resource property - - Resource to use for this request - - - - Sets Resource and Method properties - - Resource to use for this request - Method to use for this request - - - - Adds a file to the Files collection to be included with a POST or PUT request - (other methods do not support file uploads). - - The parameter name to use in the request - Full path to file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - The file data - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - This request - - - - Adds the bytes to the Files collection with the specified file name and content type - - The parameter name to use in the request - A function that writes directly to the stream. Should NOT close the stream. - The file name to use for the uploaded file - The MIME type of the file to upload - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Serializes obj to data format specified by RequestFormat and adds it to the request body. - The default format is XML. Change RequestFormat if you wish to use a different serialization format. - - The object to serialize - This request - - - - Serializes obj to JSON format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to XML format and adds it to the request body. - - The object to serialize - This request - - - - Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer - Serializes obj to XML format and passes xmlNamespace then adds it to the request body. - - The object to serialize - The XML namespace to use when serializing - This request - - - - Calls AddParameter() for all public, readable properties specified in the includedProperties list - - - request.AddObject(product, "ProductId", "Price", ...); - - The object with properties to add as parameters - The names of the properties to include - This request - - - - Calls AddParameter() for all public, readable properties of obj - - The object with properties to add as parameters - This request - - - - Add the parameter to the request - - Parameter to add - - - - - Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT) - - Name of the parameter - Value of the parameter - This request - - - - Adds a parameter to the request. There are four types of parameters: - - GetOrPost: Either a QueryString value or encoded form value based on method - - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection - - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId} - - RequestBody: Used by AddBody() (not recommended to use directly) - - Name of the parameter - Value of the parameter - The type of parameter to add - This request - - - - Shortcut to AddParameter(name, value, HttpHeader) overload - - Name of the header to add - Value of the header to add - - - - - Shortcut to AddParameter(name, value, Cookie) overload - - Name of the cookie to add - Value of the cookie to add - - - - - Shortcut to AddParameter(name, value, UrlSegment) overload - - Name of the segment to add - Value of the segment to add - - - - - Shortcut to AddParameter(name, value, QueryString) overload - - Name of the parameter to add - Value of the parameter to add - - - - - Internal Method so that RestClient can increase the number of attempts - - - - - Always send a multipart/form-data request - even when no Files are present. - - - - - Serializer to use when writing JSON request bodies. Used if RequestFormat is Json. - By default the included JsonSerializer is used (currently using JSON.NET default serialization). - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default the included XmlSerializer is used. - - - - - Set this to write response to Stream rather than reading into memory. - - - - - Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) - will be sent along to the server. The default is false. - - - - - Container of all HTTP parameters to be passed with the request. - See AddParameter() for explanation of the types of parameters that can be passed - - - - - Container of all the files to be uploaded with the request. - - - - - Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS - Default is GET - - - - - The Resource URL to make the request against. - Tokens are substituted with UrlSegment parameters and match by name. - Should not include the scheme or domain. Do not include leading slash. - Combined with RestClient.BaseUrl to assemble final URL: - {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com) - - - // example for url token replacement - request.Resource = "Products/{ProductId}"; - request.AddParameter("ProductId", 123, ParameterType.UrlSegment); - - - - - Serializer to use when writing XML request bodies. Used if RequestFormat is Xml. - By default XmlSerializer is used. - - - - - Used by the default deserializers to determine where to start deserializing from. - Can be used to skip container or root elements that do not have corresponding deserialzation targets. - - - - - A function to run prior to deserializing starting (e.g. change settings if error encountered) - - - - - Used by the default deserializers to explicitly set which date format string to use when parsing dates. - - - - - Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from element names. - - - - - In general you would not need to set this directly. Used by the NtlmAuthenticator. - - - - - Gets or sets a user-defined state object that contains information about a request and which can be later - retrieved when the request completes. - - - - - Timeout in milliseconds to be used for the request. This timeout value overrides a timeout set on the RestClient. - - - - - The number of milliseconds before the writing or reading times out. This timeout value overrides a timeout set on the RestClient. - - - - - How many attempts were made to send this Request? - - - This Number is incremented each time the RestClient sends the request. - Useful when using Asynchronous Execution with Callbacks - - - - - Base class for common properties shared by RestResponse and RestResponse[[T]] - - - - - Default constructor - - - - - The RestRequest that was made to get this RestResponse - - - Mainly for debugging if ResponseStatus is not OK - - - - - MIME content type of response - - - - - Length in bytes of the response content - - - - - Encoding of the response content - - - - - String representation of response content - - - - - HTTP response status code - - - - - Description of HTTP status returned - - - - - Response content - - - - - The URL that actually responded to the content (different from request if redirected) - - - - - HttpWebResponse.Server - - - - - Cookies returned by server with the response - - - - - Headers returned by server with the response - - - - - Status of the request. Will return Error for transport errors. - HTTP errors will still return ResponseStatus.Completed, check StatusCode instead - - - - - Transport or other non-HTTP error generated while attempting request - - - - - The exception thrown during the request, if any - - - - - Container for data sent back from API including deserialized data - - Type of data to deserialize to - - - - Deserialized entity data - - - - - Container for data sent back from API - - - - - Wrapper for System.Xml.Serialization.XmlSerializer. - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Encoding for serialized content - - - - - Need to subclass StringWriter in order to override Encoding - - - - - Default JSON serializer for request bodies - Doesn't currently use the SerializeAs attribute, defers to Newtonsoft's attributes - - - - - Default serializer - - - - - Serialize the object as JSON - - Object to serialize - JSON as String - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Unused for JSON Serialization - - - - - Content type for serialized content - - - - - Allows control how class and property names and values are serialized by XmlSerializer - Currently not supported with the JsonSerializer - When specified at the property level the class-level specification is overridden - - - - - Called by the attribute when NameStyle is speficied - - The string to transform - String - - - - The name to use for the serialized element - - - - - Sets the value to be serialized as an Attribute instead of an Element - - - - - The culture to use when serializing - - - - - Transforms the casing of the name based on the selected value. - - - - - The order to serialize the element. Default is int.MaxValue. - - - - - Options for transforming casing of element names - - - - - Default XML Serializer - - - - - Default constructor, does not specify namespace - - - - - Specify the namespaced to be used when serializing - - XML namespace - - - - Serialize the object as XML - - Object to serialize - XML as string - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Name of the root element to use when serializing - - - - - XML namespace to use when serializing - - - - - Format string to use when serializing dates - - - - - Content type for serialized content - - - - - Represents the json array. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The capacity of the json array. - - - - The json representation of the array. - - The json representation of the array. - - - - Represents the json object. - - - - - The internal member dictionary. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The implementation to use when comparing keys, or null to use the default for the type of the key. - - - - Adds the specified key. - - The key. - The value. - - - - Determines whether the specified key contains key. - - The key. - - true if the specified key contains key; otherwise, false. - - - - - Removes the specified key. - - The key. - - - - - Tries the get value. - - The key. - The value. - - - - - Adds the specified item. - - The item. - - - - Clears this instance. - - - - - Determines whether [contains] [the specified item]. - - The item. - - true if [contains] [the specified item]; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the specified item. - - The item. - - - - - Gets the enumerator. - - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns a json that represents the current . - - - A json that represents the current . - - - - - Gets the at the specified index. - - - - - - Gets the keys. - - The keys. - - - - Gets the values. - - The values. - - - - Gets or sets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - - - - Try parsing the json string into a value. - - - A JSON string. - - - The object. - - - Returns true if successfull otherwise false. - - - - - Converts a IDictionary<string,object> / IList<object> object into a JSON string - - A IDictionary<string,object> / IList<object> - Serializer strategy to use - A JSON encoded string, or null if object 'json' is not serializable - - - - Determines if a given object is numeric in any way - (can be integer, double, null, etc). - - - - - Helper methods for validating required values - - - - - Require a parameter to not be null - - Name of the parameter - Value of the parameter - - - - Helper methods for validating values - - - - - Validate an integer value is between the specified values (exclusive of min/max) - - Value to validate - Exclusive minimum value - Exclusive maximum value - - - - Validate a string length - - String to be validated - Maximum length of the string - - - - Comment of the cookie - - - - - Comment of the cookie - - - - - Indicates whether the cookie should be discarded at the end of the session - - - - - Domain of the cookie - - - - - Indicates whether the cookie is expired - - - - - Date and time that the cookie expires - - - - - Indicates that this cookie should only be accessed by the server - - - - - Name of the cookie - - - - - Path of the cookie - - - - - Port of the cookie - - - - - Indicates that the cookie should only be sent over secure channels - - - - - Date and time the cookie was created - - - - - Value of the cookie - - - - - Version of the cookie - - - - diff --git a/RestSharp.105.0.1/readme.txt b/RestSharp.105.0.1/readme.txt deleted file mode 100644 index 62a907c..0000000 --- a/RestSharp.105.0.1/readme.txt +++ /dev/null @@ -1,22 +0,0 @@ -*** IMPORTANT CHANGE IN RESTSHARP VERSION 103 *** - -In 103.0, JSON.NET was removed as a dependency. - -If this is still installed in your project and no other libraries depend on -it you may remove it from your installed packages. - -There is one breaking change: the default Json*Serializer* is no longer -compatible with Json.NET. To use Json.NET for serialization, copy the code -from https://github.com/restsharp/RestSharp/blob/86b31f9adf049d7fb821de8279154f41a17b36f7/RestSharp/Serializers/JsonSerializer.cs -and register it with your client: - -var client = new RestClient(); -client.JsonSerializer = new YourCustomSerializer(); - -The default Json*Deserializer* is mostly compatible, but it does not support -all features which Json.NET has (like the ability to support a custom [JsonConverter] -by decorating a certain property with an attribute). If you need these features, you -must take care of the deserialization yourself to get it working. - -If you run into any compatibility issues with deserialization, -please report it to http://groups.google.com/group/restsharp