This my solution:
$url="##MYURL##?api_token=##APIKEY##";
$args = array(
'headers' => array( '','cache-control' => 'no-cache', 'content-type' => 'application/json' ),
'body' => '{"pass":{"serial_number":"123456","Name":"Michele","Date":"2017/11/11","Type":"Abb.Annuale","Issued":"Genn.2016","Al":"Dic.2018","Number":"0123456789412"}}',
);
$response = wp_remote_post( $url, $args );
$body = wp_remote_retrieve_body( $response );
var_dump($body);
Related Posts:
- Create custom API endpoint to change custom header image
- How to get the original price of the product in woocommerce?
- Calling a method from functions.php on a click of a button
- How to redirect users to custom lostpassword page?
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- Can I write ‘RewriteCond’ using ‘functions.php’?
- How do I create comment-reply-button using element not
- How to add 2 posts under another post? Formatting should be intact
- WordPress menu deletes when trying to add a hook
- Overriding a theme redux file in child theme
- Validate a users email address when using gmail to register
- Get widget settings function?
- Making Quote Plugin more efficient
- What is the fastest way to load PHP functions that are only used in one theme template?
- Adding tawk.to code just before body tag on functions.php file
- allow subscribers to see private posts without plug in
- add_action shortcut?
- remove wp floating submenu in wp dashboard
- ACF: how do I get the fields and its values of a specific group?
- Fatal error: Uncaught Error: Call to undefined function test()
- Get page that displays all children of taxonomy parent
- Return a numerical function value in Customizer controls
- How can I get the values of my WordPress $wpdb query in Jquery?
- Function to capture a value and store it in a variable
- Adding a widget function into the php theme file
- My new button is in the wrong place
- Checking array against author id in loop
- theme_root returning a truncated URI
- Call to undefined method – Download Monitor
- How do I link a button I created in theme customizer to a function?
- Echo string and function?
- How to change menu labels
- Adding wrapper elements in the_date() like in the_title()?
- How to obtain the current website URL in my theme?
- Notify users only on post publish
- Plugin Generate Unexpected output during activation
- Remove Custom Divs from AMP pages
- Read array in php?
- Tell WP register script to load a script only when the entire page is loaded
- Can’t save php string to a custom field
- get_template_directory adding FTP root folders in urls
- Is it possible to display a DIV to not logged in users and then change it for users who are logged in?
- PHP code for displaying WordPress posts in a static page not working
- Remove extract from function
- Undefined offset: 3 in custom function
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- How to add data to a custom field at the wp_users table?
- How to make a cookie be on the whole site instead of being on a specific page/
- Child Theme’s Read More Text
- call a string/function from database
- Get date function not working
- Can/should we delete wordpress cron jobs with no action?
- How to convert Currency from USD to other IP Based currency in Php function
- Database entry removed on browser refresh, Ajax PHP jQuery
- How a HTML form can trigger a PHP function?
- Allow a user or role to view drafts and previews, but not other admin privileges?
- Display Visual Composer shortcode if a post belongs in specific categories
- Get current user id in function php
- Proper way to remove html code on child theme
- Trying to add Custom Post Type to this functions.php command
- Apply function.php filter only if url not has /amp/
- Preventing direct access to a page in WordPress
- How to use data URL in WordPress?
- Flushing the slug base has no effect and does not change
- Multiple cron jobs vs daily cron job doing multiple things? Which one yields better performance and scalability?
- How to link all featured images to custom url in single.php for only non-logged-in users?
- JQuery modal not loading video on popup, only displaying it after multiple reopenings
- Get user by meta data key and velue
- Logo custom width not implementing
- Woocommerce textarea format ignored
- custom post type column countdown
- Add another role to a user when they click a button?
- Using wordpress functions in class and change my code to OOP PHP
- Creating wordpress user registration form
- Add missing alt tag to featured images for “storefront” theme
- Notice: Undefined index: post_title error
- Unable to pass arguments to function used in add_action
- What is the proper way to call a function (from functions.php) on a link click?
- Displaying POST content with HTML tags and all
- Dropdown menu on custom menu
- Showing wordpress latest post thumbnails in slider with auto increment
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- My function echos only “array”
- Notify admin (by email) if post added with specific tag
- WordPress get_post_meta issue
- Woocommerce Price Text
- Limit Taxonomy Parents
- WordPress HTML Helper
- List sibling pages widget, exclude current page
- How to add button to top of theme customizer?
- Display custom meta box in my template file
- Send foreach $_post method to contact form 7 [closed]
- Options.php loop won’t show!
- base64_encode conflict with convert_smilies in wordpress
- Contact form with dynamic dropdown and filter
- Critical Error customiser
- Add multiple HTML attributes to an Elementor button
- How to cut a section of a URL from a string with a regular expression?
- /page/2/ redirect to 404
- How to pass value to add_filter wpcf7_form_tag from another function?