Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $('.zzz').click(function (e)
- {
- e.preventDefault();
- e.stopPropagation();
- $.ajax({
- url: '/XXX/yyy',
- data: { test: "hello" },
- type: "post",
- success: function () { alert("success"); },
- error: function () { alert("error"); }
- });
- });
- </script>
- public class XXXController : AsyncController
- {
- [HttpPost]
- public ActionResult YYY()
- {
- return null; // ====== NEVER REACHES HERE
- }
- }
- Request URL:http://localhost:47038/xxx/yyy
- Request Method:POST
- Status Code:301 Moved Permanently
- Remote Address:[::1]:47038
- Referrer Policy:no-referrer-when-downgrade
- Response Headers
- =================
- Access-Control-Allow-Origin:*
- Content-Length:154
- Content-Type:text/html; charset=UTF-8
- Date:Tue, 21 Nov 2017 16:02:23 GMT
- Location:http://localhost:47038/xxx/yyy/
- Server:Microsoft-IIS/10.0
- X-Frame-Options:SAMEORIGIN
- X-Powered-By:ASP.NET
- X-SourceFiles:=?UTF-8?B?QzpcdmF1bHRccHJpbnRlcnBpeG12Y3VpXFByaW50ZXJQaXhNdmNVSVxYWFhcWVlZ?=
- Request Headers
- ================
- view source
- Accept:*/*
- Accept-Encoding:gzip, deflate, br
- Accept-Language:en-GB,en-US;q=0.9,en;q=0.8
- Connection:keep-alive
- Content-Length:10
- Content-Type:application/x-www-form-urlencoded; charset=UTF-8
- Cookie:ASP.NET_SessionId=rargvavdg0reeuhqvqkznsaj; MachineToken=a2fec363-6318-4ec3-8d2c-0eee116fc778; __RequestVerificationToken=80gj5joNWUpBjgjOsxkV0SkDwhrX3fNbzYTZrTaUGpJXlIEY7nyguehSDpz525JKyNfjlI5Two-poQs1dC2jw0kWnpvnK74iz4X3KV5MtSI1
- Host:localhost:47038
- Origin:http://localhost:47038
- Referer:http://localhost:47038/xxx/Index/?product=puzzle
- User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
- X-Requested-With:XMLHttpRequest
- Form Data
- ==========
- test:hello
Add Comment
Please, Sign In to add comment