• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Send POST data via raw JSON with Postman

phpjsonrestpostman


PHP Snippet 1:

print_r(json_decode(file_get_contents("php://input"), true));

PHP Snippet 2:

foo=bar&foo2=bar2

PHP Snippet 3:

$.ajax({
    "url": "/rest/index.php",
    'data': JSON.stringify({foo:'bar'}),
    'type': 'POST',
    'contentType': 'application/json'
});

PHP Snippet 4:

$params = (array) json_decode(file_get_contents('php://input'), TRUE);
print_r($params);

Related Snippets

How can I make a full text index of the column?

Laravel - Implicit route model binding with soft deleted data

SQL to convert multiple rows into a single row of variable length

Laravel whole batch is cancelled if one Job fails

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

laravel MVC execution flow

Fetch files from next cloud storage and display in Laravel website

Adding Multiple Custom Post Types in Wordpress

How to validate tin and cst using PHP?

No definition found for function in vendor vscode

How to create a video stream from a single dynamic image in PHP

Why isn't my PHP exception working?

generate an Excel file using PHP

Laravel lang slug in url

jwt decode throws Invalid argument supplied for foreach() on php-jwt and codeignitor 4

About Contact Privacy policy Terms and conditions