{"id":18031991,"url":"https://github.com/anuviswan/resthelper","last_synced_at":"2025-04-04T21:44:36.324Z","repository":{"id":115005973,"uuid":"76961702","full_name":"anuviswan/RestHelper","owner":"anuviswan","description":"RestHelper is a sleek and simple Wrapper library for providing simple access to Rest API, by hiding away the complexities of HTTPClient Class.It is particularly designed to work along with Xamarin PCL Projects. ","archived":false,"fork":false,"pushed_at":"2018-06-10T13:52:18.000Z","size":36383,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-14T15:04:53.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anuviswan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-20T14:07:43.000Z","updated_at":"2018-06-10T13:50:14.000Z","dependencies_parsed_at":"2023-06-09T00:30:19.415Z","dependency_job_id":null,"html_url":"https://github.com/anuviswan/RestHelper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuviswan%2FRestHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuviswan%2FRestHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuviswan%2FRestHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuviswan%2FRestHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anuviswan","download_url":"https://codeload.github.com/anuviswan/RestHelper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256090,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T10:11:57.014Z","updated_at":"2025-04-04T21:44:36.295Z","avatar_url":"https://github.com/anuviswan.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RestHelper\n--------------\nRestHelper is a sleek and simple Wrapper library for providing simple access to Rest API, by hiding away the complexities of HTTPClient Class.It is particularly designed to work along with Xamarin PCL Projects. The Project is an open-source solution created by EcSolvo Technologies and maintained by contribution from Open-Source Community.\n\nNuget Package : https://www.nuget.org/packages/EcSolvo.RestHelper/\n\nThe following section outlines how to use EcSolvo.RestHelper Libraries.\n\nRestHelper Constructor and ExecuteAsync\n-----------------------------------------\n\nThe RestHelper Constructor and ExecuteAsync Method is the heart of RestHelper Library. It is build on 'Pit of Success' philosophy, removing erronous steps by the consuming Developer.\nThe RestHelper Constructor takes a single Parameter, which is the base address of your API.The ExecuteAsync is an Asynchronous Method which take in two Parameters, \na) HTTP Verb (GET,POST)\nb) Resource (URL to the exact API Resource)\n\nFor GET Request\n----------------\n\nFor Handling URI Parameters, the EcSolvo.RestHelper Library exposes a method called 'AddURLParameters', which helps to add parameters to the QueryString dictionary.\n\nprivate string _BaseAddress = \"http://localhost:8888/\";\n\nvar resourceURL = \"api/user/SingleParamStringResponse\";\n\nvar restHelper = new EcSolvo.RestHelper(_BaseAddress);\n\nstring ParameterKey = \"VariableStr\";\n\nstring ParameterValue = \"DummyString\";\n\nrestHelper.AddURLParameters(ParameterKey, ParameterValue);\n\nvar result = await restHelper.ExecuteAsync\u003cstring\u003e(HttpMethod.Get, resourceURL);\n\n\nThe library works even if the parameter passed is a Complex Parameter (Controller uses FromUri Attribute).\n\nFor POST Request\n-----------------\n\nFor Handling OnBody Parameter in POST Request, the library exposes a method called 'AssignMessageBodyParameter'.\n\nrestHelper.AssignMessageBodyParameter(Parameter);\n\nvar result = await restHelper.ExecuteAsync\u003cstring\u003e(HttpMethod.Post, resourceURL);\n\nIf the POST Request have additional URI Parameters, it can use the 'AddURLParameters' Method to add it to the dictionary.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanuviswan%2Fresthelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanuviswan%2Fresthelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanuviswan%2Fresthelper/lists"}