خرید بک لینک

Vote count: 0

How can I call this post request in c# (not web)

jQuery.ajax({
    url: "URL",
    type: "POST",
    data:  JSON.stringify({"appname":"","user":""}),
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (response) {
        console.log("success");
    },
    error: function (response) {
        console.log("failed"); alert("fail");
    }
});

In javascript the call is working, because I can justify the data-type, content-type and data-format with json.

How can I achieve this in c# (Webrequest?) How can I set all of the ajax parameters in c#? The server accepts only the json format. Is this possible in c#

thx

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 9 خرداد 1395 ساعت: 15:17

صفحه بندی