import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.DataOutputStream;
The HTTP response code you get is
415 Unsupported Media Type
This means that the server can not handle the format you sent to it. Your HTTP request sets this header:
Content-Type: application/x-www-form-urlencoded
This is the content type sent by a browser if a form is submitted. If you want to send JSON, use this header:
Content-Type: application/json