We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am working on a project using fakeweb. Found it to be useful. :)
I have a scenario in which I need to return different responses based on the data passed in the request on the same URI. Example below:
FakeWeb.register_uri(:post, %r{http:\/\/api.flickr.com\/services\/rest\/}, parameters: {method: 'flickr.reflection.getMethods', format: 'json', nojsoncallback: "1"}, body: "First Content") # Should return First Content FakeWeb.register_uri(:post, %r{http:\/\/api.flickr.com\/services\/rest\/}, parameters: {method: 'flickr.photos.getRecent', format: 'json', nojsoncallback: "1"}, body: "Second Content") # Should return Second Content
In the case above, the URI is the same, however, the values of the parameters are different.
How this can be achieved?
The text was updated successfully, but these errors were encountered:
It doesn't look like this functionality is currently present, I also need this feature and haven't yet found a solution.
Sorry, something went wrong.
They support rotating responses but that too doesn't seem to work. It always responds with first registered response.
rotating responses
No branches or pull requests
I am working on a project using fakeweb. Found it to be useful. :)
I have a scenario in which I need to return different responses based on the data passed in the request on the same URI. Example below:
In the case above, the URI is the same, however, the values of the parameters are different.
How this can be achieved?
The text was updated successfully, but these errors were encountered: