Skip to content

Request forwarding to wait callback#10

Open
emidiocroci wants to merge 4 commits into
xetorthio:masterfrom
emidiocroci:master
Open

Request forwarding to wait callback#10
emidiocroci wants to merge 4 commits into
xetorthio:masterfrom
emidiocroci:master

Conversation

@emidiocroci
Copy link
Copy Markdown

I used shmock to mock requests to a legacy library during some integration tests and I needed to inspect the received request in order to get the value of some parameters contained in the body, so I decided to forward it in the wait callback. I should be useful for an advanced inspection of the received request.

@tinchogob
Copy link
Copy Markdown
Contributor

Maybe I'm misunderstanding you, but can't you do it with .send()

https://github.com/xetorthio/shmock#on-request-body

@emidiocroci
Copy link
Copy Markdown
Author

From what I understood, .send() is used to tell shmock what parameters it should expect in the request but I need to know what are the received parameters (not if they are equal to something else). More precisely, I was mocking an authentication request and I needed to know what was the username sent to the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants