Después de mucho batallar pudimos hallar el arreglo de esta cuestión que muchos de nuestros usuarios de este sitio web han presentado. Si tienes algún dato que aportar puedes aportar tu conocimiento.
Ejemplo 1: marcador de posición json
fetch('https://jsonplaceholder.typicode.com/todos/1')
.then(response => response.json())
.then(json => console.log(json))
Ejemplo 2: dummy api json
var xhr = new XMLHttpRequest();
xhr.open("GET","https://reqres.in/api/products/3", true);
xhr.onload = function()
console.log(xhr.responseText);;
xhr.send();
Ejemplo 3: api ficticia
React Fakers is a collection of dummy data from the most popular dummy data
providers such as Json Place Holder, Faker, Pokemon, etc,
for application development testing.
npm i react-fakers | yarn add react-fakers
Ejemplo 4: crear json api en línea
"links":"self":"http://example.com/articles","next":"http://example.com/articles?page[offset]=2","last":"http://example.com/articles?page[offset]=10",
"data": ["type": "articles",
"id": "1",
"attributes":"title":"JSON:API paints my bikeshed!",
"relationships":"author":"links":"self":"http://example.com/articles/1/relationships/author","related":"http://example.com/articles/1/author",
"data":"type":"people","id":"9",
"comments":"links":"self":"http://example.com/articles/1/relationships/comments","related":"http://example.com/articles/1/comments",
"data": ["type":"comments","id":"5","type":"comments","id":"12"
]
,
"links":"self":"http://example.com/articles/1"],
"included": ["type": "people",
"id": "9",
"attributes":"firstName":"Dan","lastName":"Gebhardt","twitter":"dgeb",
"links":"self":"http://example.com/people/9","type": "comments",
"id": "5",
"attributes":"body":"First!",
"relationships":"author":"data":"type":"people","id":"2",
"links":"self":"http://example.com/comments/5","type": "comments",
"id": "12",
"attributes":"body":"I like XML better",
"relationships":"author":"data":"type":"people","id":"9",
"links":"self":"http://example.com/comments/12"]
Si crees que te ha resultado útil nuestro post, nos gustaría que lo compartas con más programadores y nos ayudes a difundir esta información.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)