https://linen.dev logo
#help
Title
# help
f

Fb

05/17/2023, 2:07 PM
Hi Team, I have been trying some solution but no luck on getting post body using wire mock , i have been trying to add post body for '.body(BodyInserters.fromMultipartData(builder.build())' vbut keep getting 500, would really appreciate any help
o

Oleg Nenashev

05/17/2023, 2:41 PM
Hello, could you please share the whole response initialization code?
f

Fb

05/17/2023, 3:09 PM
return <http://client.post|client.post>().body(BodyInserters.fromMultipartData(builder.build()).retrive().bodyToMono(TestClass.class).onErrorMap(e-> throw cx exception).block()
MultipartBodyBuilder builder= new MultipartBodyBuilder(); builder.asyncPart("content",Flux<DataBufffer> content, DataBuffer.class).filename('test.pdf').contentType(MediaType.Application_pdf);builder.part("accessList","testaccess");
this one is builder part
if I comment out body part, wire mock test passed w/o any error
but with body in post its giving me 500
o

Oleg Nenashev

05/17/2023, 4:10 PM
Normally services are not expected to respond with information in POST, so maybe it's automatic assertion just for this request type. Do you see any information in the log?
f

Fb

05/17/2023, 4:31 PM
Thanks Oleg, , I will check out assertion and update you
I did comment out assertion but we are still getting same 500 internal server error , with original stack trace : at reactor.netty.http.client.HttpClientOperations.inInbountNext
o

Oleg Nenashev

05/18/2023, 5:37 AM
Could you please provide the full stacktrace? Including the error message in the log if possible
f

Fb

05/18/2023, 2:15 PM
sure , will do
2 Views