title: How can I GET JSON from a localhost's API with Alamofire | Swift
body: <p>I want to get JSON from localhost, this is my code </p>
  
  <pre><code>   Alamofire.request(.GET, "localhost/speex/service.php")
          .responseJSON { response in
              debugPrint(response)
      } 
  </code></pre>
  
  <p>but it sends me this error </p>
  
  <pre><code>[Request]: &lt;NSMutableURLRequest: 0x7fc53960dda0&gt; { URL: localhost/speex/service.php }
  [Response]: nil
  [Data]: 0 bytes
  [Result]: FAILURE: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSUnderlyingError=0x7fc539567ad0 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "(null)"}, NSErrorFailingURLStringKey=localhost/speex/service.php, NSErrorFailingURLKey=localhost/speex/service.php, NSLocalizedDescription=unsupported URL}
  [Timeline]: Timeline: { "Request Start Time": 484405610.886649, "Initial Response Time": 484405612.654189, "Request Completed Time": 484405612.654189, "Serialization Completed Time": 484405612.654278, "Latency": 1.76753997802734 secs, "Request Duration": 1.76753997802734 secs, "Serialization Duration": 8.89897346496582e-05 secs, "Total Duration": 1.76762896776199 secs }
  </code></pre>
  
  <p>PD: When I open the url "localhost/speex/service.php" I can see the JSON code correctly</p>