Mocking presign request #4169
-
Is there a way to mock a presign request? Seems like all examples assume we will be calling |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Which part of the presigned request do you want to mock, the creation of the request or sending the request/receiving a response? Normally for the SDK mocking is done so you can get back some data without making a network call. For creating a PresignedRequest we just return the request object without making any network calls and you can make any assertions against it that you wish. If you mean mocking the sending of a presigned request, no we don't offer a way to do that today. You would be best served by using whatever testing/mocking options are available in the http library you will be using to send the request. |
Beta Was this translation helpful? Give feedback.
Which part of the presigned request do you want to mock, the creation of the request or sending the request/receiving a response? Normally for the SDK mocking is done so you can get back some data without making a network call.
For creating a PresignedRequest we just return the request object without making any network calls and you can make any assertions against it that you wish.
If you mean mocking the sending of a presigned request, no we don't offer a way to do that today. You would be best served by using whatever testing/mocking options are available in the http library you will be using to send the request.