-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Is it possible to call WeatherForecast Api by javascript from Ajax ?
how is the token used ?
I try this, but seem not run..
$.ajax({
type: 'GET',
url: "http://localhost:4321/WeatherForecast",
contentType: "application/json; charset=utf-8",
dataType: "JSON",
beforeSend: function (xhr) {
xhr.setRequestHeader('ApiKey', 'hL4bA4nB4yI0vI0fC8fH7eT6');
},
success: function (result) {
alert(JSON.stringify(result));
},
error: function (xhr, status, error) {
alert(error);
}
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels