---
title: "Discussion on \"Magento 2 - How to enable POST request on Controller without X-Requested-With: XMLHttpRequest\" | Hashnode"
description: "Discussion on \"Magento 2 - How to enable POST request on Controller without X-Requested-With: XMLHttpRequest\". By Default, if you want to request thru post method, you need to need to decide this on Header Request :\nX-Requested-With: XMLHttpRequest\n\n\nProblem here is, what if we won’t include that header?\n1. Use the classes\nUse this classes by putting on top o..."
url: "https://hashnode.com/posts/magento-2-how-to-enable-post-request-on-controller-without-x-requested-with-xmlhttprequest/61acc5e6b6bca85a26d3e464"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Magento 2 - How to enable POST request on Controller without X-Requested-With: XMLHttpRequest](https://fiko.me/magento-2-how-to-enable-post-request-on-controller-without-x-requested-with-xmlhttprequest?utm_source=hashnode&utm_medium=feed)

By Default, if you want to request thru post method, you need to need to decide this on Header Request : X-Requested-With: XMLHttpRequest Problem here is, what if we won’t include that header? 1. Use the classes Use this classes by putting on top o...

Aug 27, 2019 · 1 min read · fiko.me  
Updated Sep 27, 2023  
Read the article

-   [#magento](https://hashnode.com/tag/magento)
-   [#magento-2](https://hashnode.com/tag/magento-2)

## Written by

[Fiko Borizqy](https://hashnode.com/@fikoborizqy)

@fikoborizqy · Yogyakarta, Indonesia

  
[View profile](https://hashnode.com/@fikoborizqy)

Magento 2 Developer

I wrote these tutorials for myself in future when I forget for the next steps.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
