예제 #1
0
        public IRestResponse DeleteEmployee(string id)
        {
            _restRequest = new RestRequest(Method.DELETE);
            RestClient restClient = new RestClient($"{EndPoints.DeleteEmployeeEndpoint}/{id}");

            _restRequest.AddParameter("undefined", ParameterType.UrlSegment);
            return(_restResponse = RestServiceHelper.Execute(restClient, _restRequest));
        }
예제 #2
0
        public IRestResponse MakePostRequest(string jsonString)
        {
            _restRequest = new RestRequest(Method.POST);
            _restRequest.AddHeader("Content-Type", "application/json");
            RestClient restClient = new RestClient(EndPoints.CreateEmployeeEndpoint);

            _restRequest.AddParameter("undefined", jsonString, ParameterType.RequestBody);
            return(_restResponse = RestServiceHelper.Execute(restClient, _restRequest));
        }