diff --git a/internal/httpapi/films_crud_test.http b/internal/requests/films_crud_test.http similarity index 75% rename from internal/httpapi/films_crud_test.http rename to internal/requests/films_crud_test.http index 5247860..00e44ab 100644 --- a/internal/httpapi/films_crud_test.http +++ b/internal/requests/films_crud_test.http @@ -1,23 +1,23 @@ ### Films API sample requests (IntelliJ HTTP Client) ### List films (default pagination) -GET http://localhost:8080/films +GET http://{{base_url}}/films Accept: application/hal+json ### List films with expand and filters -GET http://localhost:8080/films?limit=5&offset=0&expand=actors,language&language.name=English +GET http://{{base_url}}/films?limit=5&offset=0&expand=actors,language&language.name=English Accept: application/hal+json ### List films filtered by category name -GET http://localhost:8080/films?limit=5&category.name=Action +GET http://{{base_url}}/films?limit=5&category.name=Action Accept: application/hal+json ### Get a single film -GET http://localhost:8080/films/1?expand=actors,language,original_language +GET http://{{base_url}}/films/1?expand=actors,language,original_language Accept: application/hal+json ### Create a film (server computes next film_id) -POST http://localhost:8080/films +POST http://{{base_url}}/films Content-Type: application/json Accept: application/hal+json @@ -35,7 +35,7 @@ Accept: application/hal+json } ### Create a film with explicit film_id -POST http://localhost:8080/films +POST http://{{base_url}}/films Content-Type: application/json Accept: application/hal+json @@ -47,7 +47,7 @@ Accept: application/hal+json ### Replace film (PUT) # Note: Replace the :id variable below to match an existing film id -PUT http://localhost:8080/films/{{film_id}} +PUT http://{{base_url}}/films/{{film_id}} Content-Type: application/json Accept: application/hal+json @@ -66,7 +66,7 @@ Accept: application/hal+json } ### Patch film (partial update) -PATCH http://localhost:8080/films/{{film_id}} +PATCH http://{{base_url}}/films/{{film_id}} Content-Type: application/json Accept: application/hal+json @@ -76,8 +76,8 @@ Accept: application/hal+json } ### Delete film -DELETE http://localhost:8080/films/{{film_id}} +DELETE http://{{base_url}}/films/{{film_id}} ### Related: list actors of a film -GET http://localhost:8080/films/{{film_id}}/actors +GET http://{{base_url}}/films/{{film_id}}/actors Accept: application/hal+json diff --git a/internal/httpapi/http-client.env.json b/internal/requests/http-client.env.json similarity index 54% rename from internal/httpapi/http-client.env.json rename to internal/requests/http-client.env.json index 3a09a38..0e0f407 100644 --- a/internal/httpapi/http-client.env.json +++ b/internal/requests/http-client.env.json @@ -1,5 +1,6 @@ { "dev": { + "base_url": "localhost:8080", "film_id": "10001" } } \ No newline at end of file