I have written a very small example: a junit button which sends a POST request with a pair of values:
This is by design. Your POST data must contain csrfmiddlewaretoken value. You can get it from your cookies and then send it with POST requests. Details here. For your specific case, you can do this -
csrfmiddlewaretoken