You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Java jdk-11.0.22 to run imposter-3.22.0.jar --plugin rest
How is it possible to retrieve using a Groovy script the parts of a REST request whose content-type=multipart/form-data ?
The Groovy script returns a null body while the content-length=48199 - see below:
I am using Java jdk-11.0.22 to run imposter-3.22.0.jar --plugin rest
How is it possible to retrieve using a Groovy script the parts of a REST request whose content-type=multipart/form-data ?
The Groovy script returns a null body while the content-length=48199 - see below:
Groovy script extract:
logger.info "DEBUG - context.request = " + context.request
logger.info "DEBUG - context.request.body = " + context.request.body
logger.info "DEBUG - context.request.formParams = " + context.request.formParams
Log console extract at execution
10:51:26 INFO s.r.a.s.c.v1 - DEBUG - context.request = Request{path='/myapi', method='POST', uri='http://127.0.0.1:8080/myapi', pathParams={}, queryParams={}, headers={mime-version=1.0, content-length=48199, host=127.0.0.1:8080, content-type=multipart/form-data; boundary="----=_Part_86_1037032677.1716281485976", connection=Keep-Alive, accept-encoding=gzip,deflate,br, user-agent=Apache-HttpClient/4.5.14 (Java/17.0.10)}, body=}
10:51:26 INFO s.r.a.s.c.v1 - DEBUG - context.request.body = null
10:51:26 INFO s.r.a.s.c.v1 - DEBUG - context.request.formParams = [:]
Thanks for your support
The text was updated successfully, but these errors were encountered: