Q:

c# http post get data from Request.Form in readable string format

i have this on client side
            $http({
                method: 'POST',
                url: "/FileManager/SavePivotFile",
                data: JSON.stringify(tempOptions),
                params: {
                    fileName: $stateParams.report.FileName
                },
                headers: { 'Content-Type': "application/x-www-form-urlencoded" },
            })
            .then(function (success) {
                showNotification('The changes have been saved.', 'info');
            }, function (error) {
                showNotification('Failed to save the file.', 'error');
            });

And this on server
    [System.Web.Http.HttpPost]
    public void SavePivotFile(string fileName)
    {
        var qqq = Request.Form;

    }

When i send the data in server i get the string like "{%7b%22dataSource%22%3a%7b%22type%22%3a%22xmla%22%2c%22c"
How can format this to human readable format like: "{"dataSource":{"type":"xmla","columns":[{"name"
So later can write this to a file?

A:

you  can just use UrlDecode 
var str=   HttpUtility.UrlDecode("%7b%22dataSource%22%3a%7b%22type%22%3a%22xmla%22%2c%22c");

But I think that your Json Doc  is not complete
Note
You have to reference System.Web if It is not done 

