• 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

Cant seem to get the Pagination to work on my WooCommerce REST API application?

Adding custom body class to the custom archive pages

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

passwordless LDAP login and get user information using Kerberos ticket in PHP

Php - Sum up the numbers in an array one by one

How can I get new CSRF token in LARAVEL by using ajax

PHP: PDO + CSV export not downloading (headers issue?)

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

How can I create a Download Page with post php method?

javascript html popup window

How to submit a form when page loads using JavaScript?

How to install ZeroMQ for PHP on an Alpine Linux container?

Fatal error: [] operator not supported for strings

Woocommerce redirect after add-to-cart error

"cannot list resources" error from WooCommerce REST API

About Contact Privacy policy Terms and conditions