Skip to content

Fixes HTTP Server Example#49

Merged
MelbourneDeveloper merged 2 commits intomainfrom
fixhttpservertest
Sep 12, 2025
Merged

Fixes HTTP Server Example#49
MelbourneDeveloper merged 2 commits intomainfrom
fixhttpservertest

Conversation

@MelbourneDeveloper
Copy link
Copy Markdown
Owner

TLDR

Fixes the HTTP server example by hitting the ACTUAL osprey server instead of an arbitrary web server.

What Was Added?

  • Implements handlers for POST, PUT, and DELETE requests, expanding the API functionality beyond simple GET requests.
  • Adds more realistic example data in the responses, such as user lists, login tokens, and success messages.

What Was Changed / Deleted?

  • Refactors the request handler to use a match statement on both the HTTP method and path, enabling different behaviors for different request types.
  • Updates expected output in tests to match the new API responses and the addition of a print statement.
  • Modifies the handler name to better reflect its function.

How Do The Automated Tests Prove It Works?

  • The integration tests now verify the correct responses for GET, POST, PUT, and DELETE requests to various API endpoints.
  • The tests ensure that the server returns the expected status codes and JSON payloads for each request type.

Summarise Changes To The Spec Here

  • The HTTP server example now covers all major HTTP methods (GET, POST, PUT, DELETE), demonstrating a more complete API interaction.

@MelbourneDeveloper MelbourneDeveloper merged commit a6ee0bf into main Sep 12, 2025
1 check passed
@MelbourneDeveloper MelbourneDeveloper deleted the fixhttpservertest branch September 12, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant