retrieve JsonObject in POST with jersey

前端 未结 3 1648
我寻月下人不归
我寻月下人不归 2021-01-03 04:50

I have some problems in my application, I send a POST request, but I cannot retrieve the JsonObject in my server, this is the code to send:

String quo = \"{\         


        
3条回答
  •  离开以前
    2021-01-03 05:31

    Have you had any JSON requests successfully parsed? It could be that you need to enable JSON support in Jersey:

    https://jersey.java.net/documentation/1.18/json.html

    Otherwise, it may simply be failing on your request to turn the message body into a JsonObject here:

    public String createNetwork(
        @HeaderParam(value = "X-Auth-Token") String authToken, 
        @PathParam(value = "tenant_id") String tenant_id, 
        JsonObject network)
    

提交回复
热议问题