Skip to content

Commit

Permalink
Se agregaron ejemplos de peticiones
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAGtz committed Oct 12, 2023
1 parent 22776bf commit 6afb290
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions request.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Todas los libros
GET http://localhost:8030/

# Obtener libro por id
GET http://localhost:8030/1

# Crear un nuevo libro
POST http://localhost:8030/
Content-Type: application/json
{
"id_author": 3,
"id_category": 1,
"title": "El conde de montecristo",
"pages": 500
}

# Actualizar un libro
PUT http://localhost:8030/1
Content-Type: application/json
{
"id_author": 1,
"id_category": 1,
"title": "Actualizacion uno",
"pages": 500
}

# Eliminar un libro
DELETE http://localhost:8030/1

# Todas los autores
GET http://localhost:8030/author

# Obtener autor por id
GET http://localhost:8030/author/3

# Crear un nuevo autor
POST http://localhost:8030/author
Content-Type: application/json
{
"name": "John Doe"
}

# Actualizar un autor
PUT http://localhost:8030/author/2
Content-Type: application/json
{
"name": "Jhony Bravo 2"
}

# Eliminar un autor
DELETE http://localhost:8030/author/2

# Todas las categorias
GET http://localhost:8030/category

# Obtener categoria por id
GET http://localhost:8030/category/1

# Crear una nueva categoria
POST http://localhost:8030/category
Content-Type: application/json
{
"name": "Ciencia ficcion"
}

# Actualizar una categoria
PUT http://localhost:8030/category/4
Content-Type: application/json
{
"name": "Novelas"
}

# Eliminar una categoria
DELETE http://localhost:3003/category/1

0 comments on commit 6afb290

Please sign in to comment.