user1899082
user1899082

Reputation:

Mocking a REST service

There "will" be a REST API written in Java that I should connect to it from my Rails application. So I need the client and I am using Net::HTTP. But the problem is that the Java service is not written yet! It is in progress by other co-workers! But still I don't want to be blocked and want to somehow mock it or something and write my code.

I do know what the service uri will look like, what params it will have, what JSON response it will return, etc... but I just don't have the real working service to connect to.

Is there a way I can mock it and keep coding for my side? What do you suggest?

Upvotes: 0

Views: 226

Answers (3)

Allen Chen - MSFT
Allen Chen - MSFT

Reputation: 11

Try my mock server: https://mockserver.codeplex.com/ It's easy to use and extend.

Upvotes: 0

tomashanacek
tomashanacek

Reputation: 36

look at http://tomashanacek.github.io/mock-server/ - simple mock server for REST API

Upvotes: 2

Lester Peabody
Lester Peabody

Reputation: 1888

I would find another operating REST service that you can connect to and get data from. Once you have that code written, just adapt it to the service that your co-workers are writing afterwards.

Upvotes: 0

Related Questions