• 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

getting error while enter Command => php artisan route:list

Call authenticate manually in router middleware

How Can I Do LIMIT 1, 2 In WP_Query

How can I make Laravel return a custom error for a JSON REST API

Upload a file Using PHP and JavaScript

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

How do I get friend list from Friends table with counts of friends of my friends

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

echo language construct is discouraged. (PHP)

Install mysql client in docker image

Testing subscription renewals on Stripe

Mobile browsers are adding .html to filename on download

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

How to loop a tree array with unknown depth and get array blocks?

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

About Contact Privacy policy Terms and conditions