java - How to deliberately make incomplete POST requests using curl or a similar tool? -
currently, trying handle following exception using resteasy exceptionmapper:
error [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-23) resteasy002005: failed executing post /apiv1/submit: org.jboss.resteasy.spi.readerexception: java.io.ioexception: ut000128: remote peer closed connection before data read
in order test handler, i'd make post requests endpoint supposed fail - in same way fail due clients network connection getting lost, client crashing while request incomplete , on.
manually interrupting request doesn't work reliably because request payload small , hence request complete before can pull plug. tried using curl --max-time
low value doesn't work reliably either.
so looking curl --max-bytes
option - make request fail after given number of bytes have been sent, opposed amount of time having passed.
is there way achieve using curl or there tool curl features similar option?
many thanks, toastor
Comments
Post a Comment