• 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

Update Order custom Field value with WooCommerce REST API

sort() not affecting original array while inside foreach loop

Magento 2 - Controller returning blank page

Ajax GET request fails in laravel 8

How to test a php login connected to a mysql db through xampp?

woocommerce change position of price

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

Symfony there are no commands defined in the "make" namespace

Laravel Delete and Update

Composer Warning: openssl extension is missing. How to enable in WAMP

how to see if database exists with PDO [duplicate]

How can I access an array/object?

Can I write PHP code across multiple lines per statement?

How to upload mpdf file after generating to s3 bucket in php

How to set dynamic `home` and `siteurl` in WordPress?

About Contact Privacy policy Terms and conditions