This is my code
Client:
$http({
method: 'POST',
url: Employee/Save,
headers: {'Content-Encoding':'gzip'},
data: { fname : $scope.fName , lname: $scope.lName}
}).success(function () {});
Controller
public async Task<JsonNetResult> Save(EmployeeModel empData)
{
}
In the above code when i pass Content-Encoding header in http post the employee data not assign the EmployeeModel only null values are assigned. But without passing Content-Encoding header data pass to the MVC controller . Now how to decompress data in MVC when use Content-Encoding:'gzip'
in MVC using c#.net.
UPDATE:
public class EmployeeModel {
public string fName{ get; set; }
public string lName{ get; set; }
}