How to read the appSettings from webconfig file

How to read the appSettings from webconfig file

Hi,

In the below function I want to read the config file appSettings in place of url key, currently I am hard coding it (url: " http://localhost:8000//API/Application/Refresh")

How can i achieve this?

function refresh() {
    document.getElementById("div-content-wrapper").innerHTML = "";
    document.getElementById("page-content-wrapper").innerHTML = "";
    $.ajax({
        type: "GET",
        dataType: "text",
        crossDomain: true,
        aysnch:true,
        success: function (response) {

            // Put the plain text in the PRE tag.
            alert(response)

        },
        error: function (error) {

            // Log any error.
            console.log("ERROR:", error);

        }
    });
}



Thanks in Advance