Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: "[url of page]",
- type: "POST",
- data: {saluto: true},
- dataType: 'text',
- success: function (response) {
- alert("successful" + response);
- },
- error: function () {
- alert("error");
- }
- });
- [HttpPost("Test")]
- public async Task<string> testHelloWorld(bool saluto)
- {
- try
- {
- string testString = "Funziona";
- Console.Write(testString + ": " + saluto + "n");
- return testString;
- }
- catch (Exception ex)
- {
- Log.Error("API(CallToXML) - Exception", ex);
- return null;
- }
- }
- public async Task<string> testHelloWorld([FromBody]bool saluto)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement