• 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

Laravel whole batch is cancelled if one Job fails

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

generate an Excel file using PHP

Check if string contains a value in array [duplicate]

Prestashop webservice API creating cart rules

Check If array is null or not in php

Log file is not being written in Laravel 5.5

Laravel Collections. Is there some kind of assertStructure method?

How to make a array inside array?

Android Volley getParams() method not getting called for JsonObjectRequest

Laravel relationship belongsToMany with composite primary keys

Laravel views are showing from cache on one server but works fine on other server

Undefined variable in Laravel 8 project (php 7.4)

Hide email address with stars (*)

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

About Contact Privacy policy Terms and conditions