A simple call like this:
type = 'theType';
category = 'theCategory';
$('#mydiv').load(
'${request.route_url('theUrl')}',
{type:type, category:category}
);
results in a "No JSON object could be decoded" error when I try to access the request.json_body
object. Looking at the request, I can see that it is a POST, X-Requested-With: XMLHttpRequest, and that the body is type=theType&category=theCategory
, which certainly isn't JSON.
What am I doing wrong?
I'm using Pyramid 1.3, Mako 0.72, jQuery 1.7.2