title: send json as data in ajax and get response
body: <p>i want to request as json to API and get response and i tried it with postman and i got response:</p>
  
  <p>json request to API:</p>
  
  <pre><code>{
  "apikey":"&amp;^$%#@!jwebdpqodp9fgkwjebfkdpqihdqlwkndqp"
  }
  </code></pre>
  
  <p>response that i got in postman and it is ok</p>
  
  <pre><code>{
  "status": 200,
  "result": {
      "winner": "s",
      "options": {
          "1": "mar",
          "2": "feb",
          "3": "jan",
          "4": "aug"
      },
      "question": "how old are u?",
      "answer": 3
  }
  </code></pre>
  
  <p>}</p>
  
  <p>my problem is i want to send ajax request and get response.i try this code but it doesnt get any response?</p>
  
  <pre><code>var data = {"apikey":"&amp;^$%#@!jwebdpqodp9fgkwjebfkdpqihdqlwkndqp"};
  $.ajax({
  type:'post',
  dataType:'json',
  url:'http://207.154.251.233:8039/app_dev.php/question/get',
  data:JSON.stringify(data),
  success:(function (response) {
  alert(response);
  })
  })
  </code></pre>