title: AngularJS get post response
body: <p>I have one AngularJS project. it is using as front end, and I have a Java web application as a back end. From AngularJS project, I am redirecting to a URL which is outside of the applications(both Java and AngularJS). From that site, It is processing the request and returning to the AngularJS application, with some data as post. </p>
  
  <p>My Java application runs on</p>
  
  <pre><code>http://localhost:8080/myjavaapp
  </code></pre>
  
  <p>AngularJS app runs on</p>
  
  <pre><code>http://localhost:8080/myangularapp
  </code></pre>
  
  <p>From AngularJS app, I am redirecting to a some URL</p>
  
  <pre><code>http://someotherwebsite.com/somepage?someparam=somevalue
  </code></pre>
  
  <p>After processing the request it sends back to AngularJS project.</p>
  
  <pre><code>http://localhost:8080/myangularapp/#/responsepage
  </code></pre>
  
  <p>But that is sending as a Post. And I want to get a request parameter in my AngularJS application. But when I return to the angularJS page, it shows error</p>
  
  <p><strong><code>Cannot POST /</code></strong></p>
  
  <p>If I used a JSP page, I could get the request parameter like</p>
  
  <pre><code>String responseString = (String) request.getParameter("response");
  </code></pre>
  
  <p>But its only HTML and JS controlers in AngularJS project. 
  Is it possible to send as post? If so, How can I get the post parameter in the JS controller?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>From other site if it's redirecting like</p>
  
  <pre><code>http://localhost:8080/myangularapp/#/responsepage?response=somevalue
  </code></pre>
  
  <p>Then it's a GET request, and easily I can get the value of <strong>response</strong> using <strong><em><code>$routeParams</code></em></strong>. it's like <code>$http.get("someurl?response=value")</code></p>
  
  <p>But in this usecase, It is sending as a POST request. Like <code>$http.post("someurl")</code>. Parameters are <strong>POST</strong> and I am not able to get the value. How can I get it?</p>
  
  <p>Thanks.</p>