title: How to resolve "TypeError: NetworkError when attempting to fetch resource."
body: <p>When I use aurelia-fetch-client to post json data to server and I got this error "TypeError: NetworkError when attempting to fetch resource." I think your answer is very useful to me.</p>
  
  <ul>
  <li><p><code>post.html</code></p>
  
  <pre><code>&lt;template&gt;
  &lt;section&gt;
      &lt;form role="form" submit.trigger="signup()"&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="OrganisationId"&gt;OrganisationId&lt;/label&gt;
          &lt;input type="text" value.bind="organisationId" placeholder="OrganisationId"&gt;
      &lt;/div&gt;
      &lt;div &gt;
          &lt;label for="OrganisationName"&gt;OrganisationName&lt;/label&gt;
          &lt;input type="OrganisationName" value.bind="organisationName"  placeholder="Password"&gt;
      &lt;/div&gt;
      &lt;button type="submit" class="btn btn-default"&gt;Enter&lt;/button&gt;
      &lt;/form&gt;
  &lt;/section&gt;
  &lt;/template&gt;
  </code></pre></li>
  <li><p><code>post.js</code></p>
  
  <pre><code>import 'fetch';
  import { HttpClient, json } from 'aurelia-fetch-client';
  
  let httpClient = new HttpClient();
  
  export class signup {
      heading1 = "Welome to User";
  
      organisationId = "";
      organisationName = "";
  
      signup() {
          alert("calliong");
  
          var myUser1 = { organisationId: this.organisationId, organisationName: this.organisationName }
          console.log(myUser1);
  
          httpClient.fetch('http://172.16.0.26:8085/employee-management/rest/employees/addOrganisations', {
              method: "POST",
              body: JSON.stringify(myUser1)
          })
              .then(response =&gt; response.json())
              .then(data =&gt; {
                  console.log(data);
              });
      }
  }
  </code></pre></li>
  </ul>