Skip to content

Commit 6fe5798

Browse files
authored
Merge pull request #15 from amikhaildev/master
Set RequestMessage in matched StubbedResponse
2 parents 4af533e + 63862cd commit 6fe5798

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tool/SystemTestingTools/Internal/HttpCallInterceptor.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ private static async Task<HttpResponseMessage> FindStub(HttpRequestMessage reque
132132
if (match.Exception != null)
133133
throw match.Exception;
134134

135-
return await match.Response.Clone(); // we clone because if the response is used more than one time, the content stream has been read and can't be read again
135+
var clonedResponse = await match.Response.Clone(); // we clone because if the response is used more than one time, the content stream has been read and can't be read again
136+
var clonedRequest = await request.Clone();
137+
138+
clonedResponse.RequestMessage = clonedRequest;
139+
return clonedResponse;
136140
}
137141
}
138142
}

0 commit comments

Comments
 (0)