• 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

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

Return multiple values from a function using mysqli_fetch_assoc [closed]

In PHP, which is faster: preg_split or explode?

Can I use a WooCommerce function without any WooCommerce page?

PHP: How to raise number to (tiny) fractional exponent?

correct PHP headers for pdf file download

How do I upload a laravel project on cPanel shared hosting?

str_replace or preg_replace random number from string

CSS file not imported in laravel blade view

Jquery DataTables: Data not displaying in table via Ajax

PHP SoapClient: set a namespace without prefix

Artisan, creating tables in database

What is PHP's equivalent of JavaScript's "array.every()"?

PHP -> Next nearest date defined by array of days in week

Laravel: HTML in notification

About Contact Privacy policy Terms and conditions