0

I am trying to automate an api which has -d information which needs to be sent.

curl request looks like this-

curl -X PUT "https://XXXXXXX.com/v1/YOLO/cccc/abc/mom" -H "accept: */*" -H "Content-Type: application/json" -d "[10035]"

I am not able to sent -d "[10035]" this part in the request.

Needs to be done restAssured and this is what I was trying-

RequestSpecification request = given().filter(new RequestLoggingFilter(requestCapture));
        Response response =  request.auth().basic(XXX,XXX).body(Arrays.asList("10017")).contentType("application/json")
                .put(Chttps://XXXXXXX.com/v1/YOLO/cccc/abc/mom").then().extract()
                .response();

I appreciate your help.

Sobhit Sharma
  • 697
  • 14
  • 45

1 Answers1

0

Try to use

 curl --data-raw "[10035]" https://example.com
jmoerdyk
  • 5,544
  • 7
  • 38
  • 49