This simple jquery call should work:
$.ajax(
{
url,
method: 'POST',
dataType: 'json',
success: function (resp) { }
}
);
The Accept is sent as 'application/json, text/javascript, */*; q=0.01', result of parse_accept_header(accept) is [('application', 'json'), ('text', 'javascript'), ('*', '*')].
Except for cowardly exiting in lookup_service_id:
if len(media_types) != 1:
return None
IMHO, it should loop over the result of media_types and only return None if no services are found.
This simple jquery call should work:
The Accept is sent as
'application/json, text/javascript, */*; q=0.01', result ofparse_accept_header(accept)is[('application', 'json'), ('text', 'javascript'), ('*', '*')].Except for cowardly exiting in
lookup_service_id:IMHO, it should loop over the result of media_types and only return None if no services are found.