I found that it didn’t work because both endpoints used the same route.
I expected defining one for POST and one for GET would result in different callbacks, but they apparently conflict with each other.
In a first time, I get the request going through simply by change the namespace for the POST.
Maybe there is a way to define different callbacks far a same namespace , I need to check that.
(Now, I have another problem which is that $data input is empty, but I need to check things and maybe make another question for that.)
Related Posts:
- WordPress Rest API custom endpoint optional param
- How to stop WP API endpoint from caching?
- Sync posts from one WordPress site to another
- “rest_no_route” – Debug error
- How to get title tag of an external page with http api?
- Can’t get POST data in API endpoint callback
- How to fix AWS SNS API end point code that cause site not to load?
- How to add an endpoint for my custom post type? /wp-json/wp/v2/posts is working but it didn’t in the custom post
- Using the JSON API via HTTPS and HTTP
- Get full page HTML for a non-public WordPress page
- What is an Endpoint?
- How do you get the API key for Locu?
- Postman Resolving “Invalid CORS request” for a POST Request
- WP function/filter for modifying http headers?
- Set up WP Authentication from External API
- How do I cache (core) API requests?
- WP REST API only returning partial list of users
- Slow REST API calls on self-hosted WordPress [closed]
- WordPress JSON output
- how to authenticate for the REST API from a plugin and from command line
- How to implement ERP (Enterprise Resource Planning) into WordPress?
- How to get the attached gallery in the rest API?
- WP API : date_query parameter
- Gutenberg internal page link search box
- WordPress.org Support Forum API
- Authentication/API Questions
- Connect external web app to wordpress
- How to get all posts (in chunks) via XML-RPC?
- How to add a custom parameter to a WP API default route?
- Developing Themes with React/Angular
- Authentication for a mobile app connected via wp-rest api?
- curl POST work with user meta but not the custom user meta
- WordPress API – count posts
- how to get nonce using json api
- API for Post Stats for Self-Hosted WordPress using JetPack [closed]
- Create post with REST API in php with file_get_contents
- How to Hit External REST POST API in WordPress? [closed]
- Displaying Content with WP Rest API
- API getting null values with wp_remote_post
- I am trying to use the Theme Customization API but I keep getting an error
- Custom Post for Locating by Google Maps API
- Extending WordPress REST API
- Headless WordPress – Issue with plugin path
- How can I cache WordPress Rest API Response
- Possible to use wordpress as publishing platform but programmatically inject content?
- How to avoid loading wp-load.php from external php scripts?
- How can I send edits to my blog programmaticly?
- I want to retrieve all posts of a blog without username & password
- WordPress as GraphQL client
- Why does wp_remote_post returns an empty body response on certain endpoints?
- How to add custom preview urls for some pages?
- How to save post with different languages and linked them with WPML?
- Mixcloud FooterWidget api errors in Chrome and Safari but not Firefox?
- wordpress “rest_invalid_handler” error
- WC REST Payment – Stripe Gateway’ is not available
- Store regex expression in WordPress DB using Options API
- Best way to integrate contact us page with wordpress REST API [closed]
- Theme Customizer API Live Preview
- Manage a resource via REST API
- WP List Table in custom post type
- Easiest way to call an External rest API?
- How to query WordPress from another application?
- How to edit feature image with XML RPC?
- Integrate product feed API in Woocommerce [closed]
- Accessing a 3rd party API – terminology to differentiate between that and publishing an API?
- WP REST API and Access-Control-Allow-Origin
- Creating posts from API data, how to identify posts already imported?
- Soundcloud Smart Player
- Use WordPress user database in external php application
- Jetpack JSON API configure button not showing [closed]
- Theme Customization API Changes not Saving
- New Twitter API and Twitter count + timeline doesn’t work anymore [closed]
- wp_signon returns user but the user is not logged in because wp installed on subdomain. How to make it work?
- get_pages and get_posts returning different data?
- Working Around rest_forbidden_context
- Solution for processing lots of data with CRON/API, dealing with memory/timeout issues
- Post content in wp_remote_post
- woocommerce api echo out response
- Limit the number of external API calls per second
- WordPress API – Getting just post content
- I need some assistance opening a few videos in VLC on android automatically from my wordpress site
- Adding geographical information on a registration page
- How to use following API with WordPress?
- rest_cannot_create_user
- Get total count of records in WP GraphQL API
- Implementing URL JSON API Data into Website
- Intergrate JSON into wordpress
- Gravit Forms Notification send after 3rd party API response
- Daily automatic update of stock quotes via REST API and Cronjob. Or is there a more sophisticated way?
- Expand author, tags and categories in the WordPress JSON API
- How to display parent category with first level child in REST API
- Stop Vimeo video with javascript – inside a loop and using a modal window
- Why does “if statement” has to “die()”, otherwise wont work?
- Cannot get transient to work on shortcode, Moz API
- XML RPC -> Create User
- Trying to integrate wordpress query on other website – getting redirection to wp-install
- WordPress SMS API integration without plugin
- Zoho subscription API to WordPress [closed]
- XMLRPC: How to retrieve possible custom fields for a new post?
- Using WordPress API to mass update posts freezes the server