title: I'm getting a 404 Error when I run a $http POST request with AngularJS
body: <p>I am building an app which allows users to place bets in betting pools. When the user hits a button, a function in the controller is executed, but the requests isn't made and returns a 404 error, any advice would be greatly appreciated. </p>
  
  <pre><code>function placeBet(bet) {
  console.log('in place bet');
  
  $http.post('https://colossusdevtest.herokuapp.com/api/tickets.json', {
    'id': 550900,
    'status': 'PLACED',
    'customer_payout': '0.0',
    'stake': bet,
    'currency': 'GBP',
    'lines': 24,
    'amount_owned_customer': '1.0',
    'cost': '12.0',
    'created_at': '2015-07-23T17:00:10.000Z',
    'offer_amount': '0.0',
    'customer_winnings': '0.0',
    'offers_accepted': '0.0',
    'merchant_ref': '15ac9a2e-d4a8-4652-a60c-2b57d1afd92b',
    'pool': {
      'id': 171,
      'name': 'Mixed 4',
      'type_code': 'POINT_MARGIN',
      'headline_prize': '4996.06',
      'status': 'OPEN',
      'sched_start': '2015-07-28T11:00:00.000Z',
      'sched_next': '2015-07-28T11:00:00.000Z',
      'currency': 'GBP',
      'leg_num': 4,
      'sport_code': 'RUGBY',
      'has_offers': false
    }
  }).then(() =&gt; {
    console.log('information posted');
  });
  }
  
  $scope.placeBet = placeBet;
  </code></pre>
  
  <p><a href="https://i%60.stack.imgur.com/XjlJw.png%60" rel="nofollow noreferrer">Problem</a></p>