You’re using an invalid Content-Type
header.
x-www-form-urlencoded
isn’t a valid content-type.
The correct content type is application/x-www-form-urlencoded
.
Essentially, the web server doesn’t know how to handle the content type you’re giving it to parse the parameters. This is why the request is failing with a 400
because WP is not getting anything in the POST body, including the action
.
You may not need to provide this header at all though as it seems to be the default value.
Related Posts:
- Query WP REST API v2 by multiple meta keys
- Prevent 404 when using pre_get_posts to filter an archive page
- AJAX filter posts on click based on category
- How can I send data to admin-ajax via JS Fetch?
- Shortcodes not resolved in AJAX call response
- Ajax, filters and shortcodes
- Multiple Ajax Data Action
- Multiple filters for wp_get_archive
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- Are there actions or filters I can use for Ajax calls?
- Does a plugin with a AJAX button filter exist? [closed]
- Sorting a specific taxonomy by archive date using URL
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- Is it possible to bind a function to a filter hook via Ajax?
- How To Override A WooCommerce AJAX Function
- Best practice: Custom Post Type / Filter / Load more
- Ajax filter – show all results that contain at least one filter
- AJAX Post Filter
- Archive Widget – Count only parent posts
- Display post after choice two taxonomy terms
- Ajax Filtering Pagination
- Modify category listing API response
- Change add_filter based on Ajax
- Filter posts by categories ajax is showing all the posts
- Filter WordPress Archive Widget to exclude posts with specific custom taxonomy term id
- URL to filter posts by post meta similar to shop/?product_cat=”painting”
- Code restricted to dashboard, running unexpectedly in the frontend (pre_get_post and admin-ajax.php)
- Hide a specific post from Archive Feed
- Post filter Month dropdown at front-end like wordpress backend
- How would I remove an inline googleAPI font script in the the parent theme header.php?
- Loading a sidebar on an Ajax call
- How could I create real-time filtering in this case?
- what is __return_false in filters
- Passing Additional Parameters to add_filter Callable
- How can I add an Author filter to the Media Library?
- Modify WordPress Rest Api Request/Response
- How to add some custom HTML into wordpress admin bar?
- Change upload directory on custom plugin page
- How to use the_excerpt in a filter hook?
- Add wrapper to only youtube videos via embed_oembed_html filter function
- Hook into admin post list page
- Add post/page ID to inserted links within the_content
- Possible to filter the posts or categories that XML-RPC users see in their mobile application?
- wp_link_pages output appears twice
- Changing a WordPress core function without hacking core
- Change WordPress RSS link with filter?
- How to remove get_post_metadata using remove_filter inside a class?
- Sorting and limitation with pre_get_posts
- Warning: Missing argument 2 for widget_title filter
- Use add_filter on concatenated string variable
- Change term name only on front
- How do I hide the current page’s title?
- Change name of existing post status type
- Header image automatically changes depending on season
- How to remove SKU’s from ALL products in Quick View – already remove from each product page
- Admin Backend – Search Pages only by title
- How to hide Ads in between posts on AMP? [closed]
- What is the downside of using a filter as a “poor man’s” dependency injection?
- BBPress changing default group activity
- Filter the_content to add something before each element?
- Filter by category and city for doctors and hospitals in wordpress
- Prevent reset password specific user role
- Change AJAX filter from POST to GET for URL Parameters
- Why is overwriting $GLOBALS killing the_content()?
- Sorting products by price ( regular + sale price )
- Create new custom field that calculates age
- Remove comments validation (remove filter?)
- Remove Site Name from wp_title WITHOUT removing from attribute
- Plugin default settings hook
- Filter Shortcodes when using get_page
- Usage of filters
- add_filter to the_content after apply_filters
- Where exactly does the edit_{taxonomy} hook fire?
- How to filter with dropdown in backend for custom data
- Is there any reason for the nested filters to be applied on the first case and not in the second one?
- Pagination don’t work with active filters
- Redirect an archive page to its relevant URL-friendly filtered page
- Show uploaded pdf files dynamically and filter by month name
- how to use substr with get_the_content()
- Add filter return false not working
- How to add markup to the wp-custom-header div
- How to take shortcode and content separately from a page?
- How to stop echoing gallery inside content?
- how to filter datalist table of wordpress
- get_the_archive_title hook unwanted changes!
- Is there a function to edit Blogs contents in Blogs page?
- Can’t set properly WordPress add_filter function
- apply_filters to $GLOBALS
- The title of an attachment is not working
- Removing a line from a WP core function (comment_template.php) – filter or other technique?
- How to remove a filter that is an anonymous object?
- Hide H1 Title using the_title filter
- get_the_excerpt on mobile still displays continue reading
- Filter and Search
- Passing form data via AJAX to REST API And displaying results
- AJAX: WordPress filters inside $html do not work as intended
- Why not showing all post by default in my jquery filter
- Adding arguments to WooCommerce Product Loop using AJAX
- How to use add_filter to add the extra data to existing array?
- ‘Problem’ with login_redirect filter – why does it lose the redirect_to parameter