Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/302.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用C#如下面的ajax调用API Async_C#_Jquery_Asp.net Mvc - Fatal编程技术网

如何使用C#如下面的ajax调用API Async

如何使用C#如下面的ajax调用API Async,c#,jquery,asp.net-mvc,C#,Jquery,Asp.net Mvc,这是我的jquery函数,用于调用ssl api,我希望它使用C#。 在C#中是否可能有相同的功能。 这个jquery函数运行良好 $('#dvShowData').html(""); $('#dvShowData').html("Loading..."); var CommandParams = { login: 'str', password: 'str', comman

这是我的jquery函数,用于调用ssl api,我希望它使用C#。 在C#中是否可能有相同的功能。 这个jquery函数运行良好

        $('#dvShowData').html("");
        $('#dvShowData').html("Loading...");
        var CommandParams = {
            login: 'str', 
            password: 'str',
            command: 'str',                  
            ssl_domain_name: 'str'
        };

        jQuery.ajax({
            crossDomain: true,
            url: 'https://api.sslguru.com',
            type: 'POST',
            async: true,
            data: { params: JSON.stringify(CommandParams) },
            success: function (output) {
                // alert(output);
                $('#dvShowData').html("");
                $('#dvShowData').html(output);
            },
            error: function (output) {
                $('#dvShowData').html("");
                alert("error");
            }
        });

这可能是一个自动链接的重复,当有人建议关闭某个问题时,堆栈溢出会将该链接放入其中,因为该问题已经得到了回答。上面写着“带post的HTTP请求”。危险地生活-单击它:)