• 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

AJAX call fails with SyntaxError: Unexpected end of JSON input

javascriptphpjqueryajax


PHP Snippet 1:

var data = {};
 data['rawFiles'] =$('#projectIDs').val(); 
 data['metadata'] = $('#getData').val();
  data['type']=  $('#submitType').val();
  data['pid']='csv';
   data['command']='data/qcTest'

PHP Snippet 2:

$.ajax({type: "POST", url: posturl, data: JSON.stringify(data), dataType: 'json'})

Related Snippets

Filter WooCommerce products with post__in and additional meta queries

How to check user Permissions using Custom Middleware in Laravel

Add custom text under order details on WooCommerce My account view order pages

MongoDB Duplicate Documents even after adding unique key

Merge column values from two arrays to form an indexed array of associative arrays

How to send image,audio or video through the WhatsApp API - PHP

Install mysql client in docker image

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

Batch request Google Calendar php API

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Xdebug 3 not showing in phpinfo on m1 Monterey

PHP: convert all UTF-8 characters to HTML entities

Doctrine 2 mapping referencing unique key

How update php.ini on a Mac OS X Mojave?

Reorder attribute dropdown terms in Woocommerce single variable products

About Contact Privacy policy Terms and conditions