title: Cannot send HTTP request while debugging
body: <p>My applications works fine when i run it by <strong>tns run ios</strong>, but when i try to debug it with <strong>tns debug ios</strong> it doesn't work well.</p>
  
  <p>When i do an HTTP request to my back-end it won't be received in the back-end and an error wil occur.</p>
  
  <blockquote>
    <p>"this.dispatchMessage is not a function. (In 'this.dispatchMessage', 'this.dispatchMessage' is undefined)"</p>
  </blockquote>
  
  <p>This is the code i am using:</p>
  
  <pre><code>http.request({
          url: config.baseUrl,
          method: "POST",
          headers: { "Content-Type": "application/x-www-form-urlencoded" },
          content: data
      }).then(function (response) {
          // Success
      }, function (e) {
          // error occur
      });
  </code></pre>