File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
sdk/core/azure-core-test/src/main/java/com/azure/core/test/http Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -284,4 +284,18 @@ private boolean isPlayingBack() {
284284 public String getRecordingFileLocation () {
285285 return xRecordingFileLocation ;
286286 }
287+
288+ /**
289+ * Redirects the provided {@link HttpRequest} to the test proxy to retrieve the playback response.
290+ * This method is invoked during playback mode to simulate the expected response for a request.
291+ *
292+ * @param request The {@link HttpRequest} to be sent.
293+ * @param context The {@link Context} associated with the operation.
294+ * @return A {@link Mono} of {@link HttpResponse} containing the playback response.
295+ */
296+ @ Override
297+ public Mono <HttpResponse > send (HttpRequest request , Context context ) {
298+ beforeSendingRequest (request );
299+ return client .send (request , context ).map (this ::afterReceivedResponse );
300+ }
287301}
You can’t perform that action at this time.
0 commit comments