you can create a new API route like that :
add_action("rest_api_init", function () {
register_rest_route(
"test_api"
, "reading_http_json"
, [
"methods" => WP_REST_Server::EDITABLE, // POST PUT PATCH
"callback" => function (WP_REST_Request $request) {
$body = file_get_contents("php://input");
$json = json_decode($body, TRUE);
// here you have data in the array $json
return NULL;
},
"permission_callback" => fn (WP_REST_Request $request) => TRUE,
]
);
});
You give the url https://server/wp_directory/wp-json/test_api/reading_http_json in their portal and then you receive the data in the array $json.
Related Posts:
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How do i best handle custom plugin page actions?
- Automatically determine minimum WordPress version required for a plugin?
- Create a custom admin page for custom post type + taxonomies + metas
- Is There A Hook To Process The Content Of The Text Widget?
- When is wp_loaded initiated only with admin or only when user enters the site or both?
- Check for featured image in WP_Query
- Enqueue script only when shortcode is used, with WP Plugin Boilerplate
- add_filter OO with parameters
- Preferred way to include Advanced Custom Fields in a plugin?
- function triggered by “manage_users_custom_column” filter not working
- Shortcodes, output buffering, and WordPress functions
- Auto update specifick plugin
- How to link to images in my plugin regardless of the plugin folder’s name
- ERROR: Options page not found – saving settings page with tabs
- What is the difference between current_page_parent and current_page_ancestor?
- Can I leave out `if ( ! defined …)` when defining plugin constants?
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- Any ideas how to make unit test read the theme functions.php?
- WordPress Ajax callback function from plugin – OOP
- Is there any way to have Featured Text, as opposed to Featured Image?
- Can I use namespaces in my plugin?
- StackExchange clone using WordPress?
- Custom url for a plugin page add_rewrite_rule WordPress
- Access first name and last name from user_register
- Woocommerce custom emails without header and footer
- Is there a way to ensure plugin script loads before another script?
- Custom attribute type not displaying terms in edit product – WooCommerce
- How do I add a prefix when a user registers
- Check and load class of theme from a plugin
- Verify if user is wordpress logged in from another app since wordpress 4.0
- Short code not working in boostrap modal dont no why?
- What is the proper way to include Bootstrap when executing a shortcode
- How can I turn a custom wordpress page into a product page?
- how to get link of added document with a post
- Doubts about the use of metadata and how this can affect performance on WordPress
- How can I replace content in the WP Admin area before an admin page is rendered?
- update_post_meta not working in a loop
- When is the proper time to minify css and js with git workflow?
- Get draggable widgets on Edit Post page
- Admin Posts List (edit.php) by post IDs
- Enqueue script globally
- White screen when activating plugin that sends form via WordPress
- dbDelta SQL Query Not Working
- wp_localize_script is not adding a global variable for javascript
- wp_get_theme Warning: Illegal offset type
- wordpress is adding a second backslash when I use addslashes
- Silently register plugin pages
- A question about add_action()
- How to add a hyperlink to the email content in WordPress?
- Menu page with minimum capability as ‘Subscriber’ doesn’t allow ‘Admin’ to access it?
- How to display the categories on page using shortcode?
- add_action pre_term_description vs. pre_category_description
- How to Get Rid of Unwanted Backslashes in WordPress Form Input inside admin menu option
- Pass CF7 form data to plugin
- WordPress plugin cron working only if admin is logged in
- How to Customize Polylang Language Items
- WP Dropdown Categories, display subcategories but not grandchildren categories?
- Enqueue scripts inside a class in a plugin
- Redirect User to custom URL after registering
- How can I change my assigned user role in WordPress 3.5.1?
- Create a Plugin to Download Files from Web to Server
- WP plugin repository didn’t parse readme.txt correctly
- “Rendering of admin template [path to template] failed”
- Allow REST API Endpoint to specific user and hide from public
- Adding a dropdown on the user admin
- Check current URL is 404 in pre_option_stylesheet filter hook
- I’m including a html file in my plugin, but it can’t find its css or js files
- How to show content in the body with my plugin (only in frontend not backend)?
- Metabox types list
- Problem in plugin debuging in wordpress
- WP Query date_query with several date range
- How to include files in the loop via ajax
- mutiple shortcode instance on the same page
- Some data has already been output, can’t send PDF file – fpdf issue in WordPress
- Can i use one wp plugin inside other?
- Plugin or Custom Page Type
- Add a new tag based on the category name in the publish event
- Login using /wp-admin doesn’t redirect back to /wp-admin
- Caption Shortcode: what filter to change the image size?
- What do “and” means infront of a variable? [closed]
- How to search on the field that stores escaped strings?
- Dropdown pages in Settings API
- Detect each active instance of a widget
- Plugin version not updated with new version
- Fatal error: Call to a member function query() on a non-object 3.6.1
- Adding Meta box to thrid-party plugin
- Fetch the input type date value via ajax
- Data Validation, dynamically generated fields (select for example)
- How to update WordPress Plugins in your own maintance application?
- register_setting registered with incorrect data type
- WordPress plugin options page not saving options, no errors
- WordPress database error: [Table ‘bitnami_wordpress.questions’ doesn’t exist]
- the function do_settings_section($page) generate error “Allowed memory size of … bytes exhausted”
- wp_enqueue_script() with unknown path and maybe symlink
- Sanitization of register_setting()
- Javascript function defined in view.js not reachable from save.js
- Why is there a bunch of WordPress HTML code in my browser CSV download?
- Custom Gutenberg block with nested InnerBlocks renderAppender not displaying add button