News for hackers. Stuff that matters.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by sinzone on Tuesday April 07, 2015 @08:06PM (#9338005)
Hi all - happy to get feedback.

Also, someone added Mockbin on Docker: https://registry.hub.docker.com/u/tomdesinto/mockbin/

Re:Mockbin: generate custom endpoints to test, mock, and tra... by voltagex_ on Tuesday April 07, 2015 @08:29PM (#9338070)
Getting a strange SSL error "SSL connection failed" on your apiembed.com iframe
Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Tuesday April 07, 2015 @08:34PM (#9338085)
cannot seem to replicate ... we're behind Cloudflare, so you could be seeing an older version of the page, we had the SSL issue earlier and fixed it.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by voltagex_ on Tuesday April 07, 2015 @08:47PM (#9338138)
It's a broken proxy between me and your site. Sorry!
Re:Mockbin: generate custom endpoints to test, mock, and tra... by doomspork on Tuesday April 07, 2015 @08:48PM (#9338142)
This is really neat. We used Apiary at my last company to document our APIs and the added benefit is that it did just this, generated and tracked a mock endpoint. Really cool stuff.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by sinzone on Wednesday April 08, 2015 @12:39AM (#9338808)
Thanks. Let us know if you need some particular additional feature.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by voltagex_ on Tuesday April 07, 2015 @08:32PM (#9338080)
I can see this is a cool tool but does anyone have any real world examples of how this would be used?
Re:Mockbin: generate custom endpoints to test, mock, and tra... by doomspork on Tuesday April 07, 2015 @08:55PM (#9338172)
I've found these tools particularly useful if you've got your team divided up into frontend vs backend/platform. We would discuss and mock up the endpoint to unblock the API consumers while the actual service is built.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by RALaBarge on Tuesday April 07, 2015 @08:49PM (#9338145)
I use something like this to test webhooks and demonstrate that the service behind it is working.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Tuesday April 07, 2015 @08:51PM (#9338159)
a simple example is when developing against a third party api, and want to validate the behavior of your code and see what the HTTP request looks like, swap the API endpoints with mockbin urls and check, even mock the response with a Bin and build your client "offline" without hitting API throttling rate limits or exceeding your quotas for paid APIs, and much more :)
Re:Mockbin: generate custom endpoints to test, mock, and tra... by sinzone on Tuesday April 07, 2015 @08:52PM (#9338161)
hi - we have written a blog post on why/how we use this internally: http://blog.mashape.com/welcoming-mockbin-to-the-mashape-fam...
Re:Mockbin: generate custom endpoints to test, mock, and tra... by adamnemecek on Tuesday April 07, 2015 @08:47PM (#9338139)
If you are developing an SPA and want to do front end first.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by WaxProlix on Tuesday April 07, 2015 @09:12PM (#9338239)
That's a ton of use cases!
Re:Mockbin: generate custom endpoints to test, mock, and tra... by fideloper on Tuesday April 07, 2015 @08:50PM (#9338148)
Anyone else get their well-timed email with a link to the "/newest" page for this submission? Interesting strategy :D
Re:Mockbin: generate custom endpoints to test, mock, and tra... by fideloper on Tuesday April 07, 2015 @09:01PM (#9338188)
I guess this can be seen as negative, I was curious if this was something y'all see a lot. Opinions?
Re:Mockbin: generate custom endpoints to test, mock, and tra... by seivan on Wednesday April 08, 2015 @03:15AM (#9339163)
Would be cool if this could generate into a framework to run the mock locally for tests. So you would run a local server instead of mocking the network calls and returning json on a method level, you would actual hit a server.

Or is that bad? Curious to hear other takes on it.

Either for testing an SDK or the network layer of app itself.

Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Saturday April 11, 2015 @01:24PM (#9359930)
we're adding proxy functionality to it this week.
Re:Mockbin: generate custom endpoints to test, mock, and tra... by WaxProlix on Tuesday April 07, 2015 @09:16PM (#9338251)
Now what we REALLY need is the ability to mock SOAP endpoints.

Semi-relatedly: I've never seen YAML over the web before, mostly just in config files and such. Is that common? Are there any examples of use out there?

Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Tuesday April 07, 2015 @09:18PM (#9338256)
I'm adding SOAP to the backlog: https://github.com/Mashape/mockbin/issues/12

as for YAML, I think its best for human readability, rather than actual usage in libraries.

Re:Mockbin: generate custom endpoints to test, mock, and tra... by earless1 on Tuesday April 07, 2015 @09:41PM (#9338334)
Does this tool also have the ability to record responses from API endpoints for future use?, or do I have to already have the response object available?
Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Tuesday April 07, 2015 @09:45PM (#9338348)
it does not, plenty of other tools to capture HAR response objects: http://ahmadnassri.github.io/har-resources/
Re:Mockbin: generate custom endpoints to test, mock, and tra... by earless1 on Tuesday April 07, 2015 @11:46PM (#9338691)
Thanks for the link
Re:Mockbin: generate custom endpoints to test, mock, and tra... by voltagex_ on Tuesday April 07, 2015 @08:53PM (#9338164)
A simpler alternative is http://httpbin.org (but the more the merrier!)
Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Tuesday April 07, 2015 @09:07PM (#9338220)
not quite the same, this is for creating custom mocked endpoints, while httpbin is pre-defined utility endpoints
Re:Mockbin: generate custom endpoints to test, mock, and tra... by voltagex_ on Tuesday April 07, 2015 @08:29PM (#9338075)
Any plans to add websocket support?
Re:Mockbin: generate custom endpoints to test, mock, and tra... by codeinchaos on Tuesday April 07, 2015 @08:35PM (#9338091)
yes! already brainstorming roadmap ideas: https://github.com/Mashape/mockbin/issues