Stub endpoints serving file responses as streams

245 views
Skip to first unread message

Mahesh Subramanian

unread,
Jul 3, 2017, 9:01:32 AM7/3/17
to wiremock-user
We are using wiremock to stub our endpoints for external dependencies.  We have wiremock deployed in a remote target environment along with application artefacts and the tests run from either the local dev machine or a CI slave.  

The particular use case we have is around serving streaming file response for a particular endpoint.  However, this requires the file to be streamed to be sitting within the __files directory of the wiremock application.  Is there anyway to upload the file programmatically from a remote location prior to registering a mapping that will use the file? 

Thanks

Tom Akehurst

unread,
Jul 3, 2017, 12:41:38 PM7/3/17
to wiremock-user
There's a (currently undocumented) call you can make that will take your entire filesystem of mappings and body files and push them to a remote WireMock instance. Example at:
Reply all
Reply to author
Forward
0 new messages