Skip to content
New issue

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

Getting all currently registered stub mappings #12

Closed
StefH opened this issue Jan 19, 2017 · 8 comments
Closed

Getting all currently registered stub mappings #12

StefH opened this issue Jan 19, 2017 · 8 comments
Assignees
Labels

Comments

@StefH
Copy link
Collaborator

StefH commented Jan 19, 2017

No description provided.

@StefH StefH added the feature label Jan 19, 2017
@StefH StefH self-assigned this Jan 19, 2017
StefH added a commit that referenced this issue Jan 20, 2017
@StefH StefH closed this as completed Jan 30, 2017
@gregoks
Copy link

gregoks commented Jul 15, 2019

Hi,

I was wondering if this is implemented? Because I see now that RequestMatchers in RequestMessageCompositeMatcher class is private. So is there a way we can get the instance of all registered mappings like we see them in the admin API?

Thx,

Greg

@StefH
Copy link
Collaborator Author

StefH commented Jul 15, 2019

Hello Greg; you can just access Mappings ?

Like

var mappings = server.Mappings.ToArray();

@gregoks
Copy link

gregoks commented Jul 15, 2019

Yeah but its an interface of IMapping, I want to be able to serialize it and send it as an object over http. Thats why I need the mapping info like path, request matchers, response etc as properties.

@StefH
Copy link
Collaborator Author

StefH commented Jul 15, 2019

You know you can just do a GET request to the /__admin/mappings to get all mappings?

@gregoks
Copy link

gregoks commented Jul 15, 2019

Yeah I know but since I have the server object in memory, I was wondering if I could get the mappings the same way as I can get LogEntries without the need of extra http call

@StefH
Copy link
Collaborator Author

StefH commented Jul 15, 2019

I see, can you create a new issue?

@StefH
Copy link
Collaborator Author

StefH commented Jul 16, 2019

#298

@gregoks
Copy link

gregoks commented Jul 16, 2019

Thanks @StefH for the quick response! Not sure if you still need it but I have created a new issue: #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants