Keep getting 400 Bad Request error when trying out AJAX on custom theme

I figured it out. I deleted two lines:

dataType: 'html',
contentType: 'application/json'

When I deleted those, I got an 200 response with the appropriate response text.