I'm new to rest assured. I need to send API Key and Autherization while making post request. When I do it with Postman(in headers), I can get a response, but when I do it with rest assured, I get "status": 415. I'm writing my code below, I wonder what I wrote wrong? I would be glad if you can help.
RequestSpecification spec = new RequestSpecBuilder().setBaseUri("url").build();
spec.pathParams("p1","v1","p2","get-ad");
Response responseAndroid = given().headers("x-api-key","xx","authorization", "aa").accept(ContentType.JSON).spec(spec).body(pojoGetAdvertisementAndroid).
post("/{p1}/{p2}");