0
私は次のようなポストマンPOSTリクエストを持っている:JerseyのWebResourceをPOST用に使用するときにフォームデータを送信する方法は?
私はニュージャージーのWebResource
を使用してコードに上記マップするために使用しているコードは次のようであるが、それは働いていない:
Client authKeyClient = Client.create();
WebResource webResource = authKeyClient.resource("https://ims-na1-stg1.company.com/token/v1");
String input = "{\"grant_type\":\"authorization_code\",\"client_id\":\"orders\",\"client_secret\":\"0af3b233-f1ca-41da-a0fa-61c08d15cadc\",\"code\":\"eyJhbGciOiJSUzI1NiIsIng1dSI6Imltc19uYTEtc\"}";
currentEnv.getImsSecret()).header("code", currentEnv.imsCode).get(String.class);
String response = webResource.post(String.class, input);
私は400 Bad Request
を得ることになります。私は間違って何をしていますか?