1
can give me a light?
I need to consume an API that requires your header to have one content-type: application/x-www-form-urlencoded
.
This api takes json parameters and returns json.
Using jquery I can but need to create a console app to run via windows task scheduler, so I need to do it using Asp.net web api c# or something like that
$.ajax({
contentType: 'application/x-www-form-urlencoded',
crossDomain: true,
type: "POST",
url: 'url',
data: JSON.stringify(params),
success: function (data) {
do it
},
error: function (data) {
do it
},
dataType: 'json',
async: false
});
I got it anyway. with Json in a string.
– Bruno Jose da Costa