32

I have been searching around but cannot find any site like this. I want to know if there is some dummy server that will respond to test GET requests and return a JSON object? Basically something like:

HTTPUtil.httpGet("http://www.ipsumlorem.com/json");

and have it return filler text JSON objects like:

{
   "title" : "Ipsum Lorem",
   "content" : "blah blah blah"
}
Matt Hintzke
  • 7,744
  • 16
  • 55
  • 113
  • 2
    if this doesn't exist, then I am going to create one right now – Matt Hintzke Jul 19 '13 at 00:11
  • Possible duplicate of [HTTP Test server that accepts GET/Post calls](http://stackoverflow.com/questions/5725430/http-test-server-that-accepts-get-post-calls) – Helen Apr 04 '17 at 22:36
  • 50 lines of python gets you an HTTP server that can serve anything you want whether that is HTTP GET/HEAD/POST etc etc https://gist.github.com/trevorboydsmith/d88af55590784f88adb61227d33d8b4e – Trevor Boyd Smith Sep 05 '18 at 13:42
  • Or try fakedata.dev which lets you access a million fake user accounts. – Johann Aug 21 '19 at 07:06
  • You can use online mock api tools like themockapis.in – nkkumawat May 12 '21 at 06:48

5 Answers5

34

http://www.jsontest.com/ will be your new best friend I guess...

Try this out for your need: http://echo.jsontest.com/title/ipsum/content/blah

It will return this:

{
   "content": "blah",
   "title": "ipsum"
}
Laurent Bristiel
  • 6,819
  • 34
  • 52
  • 3
    this url frequently responds that its exceeded its max requests. the code is available on git hub. i've downloaded it but cannot tell if its an eclipse project or a netbeans project or if it can be complied at the command line. does anyone know? – user1126515 Nov 02 '15 at 21:29
14

You can use also www.mocky.io, where you mock your HTTP responses to test your REST API.

It is possible to change also the headers of the response and of course to write precisely the content (including json...)

medCoder
  • 231
  • 1
  • 3
  • 7
10

For following tutorials and giving workshops this could be useful as well: http://jsonplaceholder.typicode.com

Yëco
  • 1,546
  • 15
  • 16
4

You can use http://apiary.io to create mock REST APIs very quickly.

If you don't care about the Content-Type it is even faster if you put a plain text file in Dropbox.

ggarber
  • 8,300
  • 5
  • 27
  • 32
1

You could use SoftwareMill's TestServer: https://github.com/softwaremill/softwaremill-common/tree/master/softwaremill-test/softwaremill-test-server

amorfis
  • 15,390
  • 15
  • 77
  • 125