skip to Main Content

Zendesk Ticket create API using ajax – Jquery ajax

BY THIS CODE PLEAS HELP HOW TO CREATE ZENDESK TICKET <script type = "text/javascript" > $(function() { $("#btnGet").click(function() { $.ajax({ url: 'https://xxxx.zendesk.com/api/v2/tickets/1.json', contentType: 'application/json', type: 'POST', data: JSON.stringify({ "ticket": { "subject": "Tst SUB", "comment": { "body": "Test BODY" } }…

VIEW QUESTION

jquery ajax post with location.href in data is not working

What is preventing type POST from getting the expected result if using location.href (or window.location.href) as data? This code is not working (it returns nothing): $.ajax({ type: "POST", url: 'page.asp', data: {'q': location.href}, success: function(short_link,status){ console.log('short_link = '+short_link); console.log('status =…

VIEW QUESTION
Back To Top
Search