Skip to content

Fix API URL trailing slash and update base URL#220

Merged
gordonkoehn merged 1 commit intomainfrom
fix/normalize-api-url-trailing-slash
Jan 13, 2026
Merged

Fix API URL trailing slash and update base URL#220
gordonkoehn merged 1 commit intomainfrom
fix/normalize-api-url-trailing-slash

Conversation

@gordonkoehn
Copy link
Collaborator

@gordonkoehn gordonkoehn commented Jan 13, 2026

Summary

  • Fix 404 errors caused by double slashes in API URLs when config has trailing slash
  • Normalize server_ip in Lapis.__init__ by stripping trailing slashes
  • Update API base URL to include /covid path segment

Test plan

  • Added unit tests for URL normalization behavior
  • Verify API calls work with new base URL
  • Test that locations and date range fetching works correctly

🤖 Generated with Claude Code

Normalize server_ip in Lapis base class by stripping trailing slashes
to prevent double-slash URLs (e.g., https://example.com//sample/aggregated).

- Add .rstrip("/") in Lapis.__init__ to normalize URLs at construction
- Remove redundant .rstrip("/") from fetch_locations (now handled in __init__)
- Add tests for URL normalization behavior
- Update API base URL to include /covid path segment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 09:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@gordonkoehn gordonkoehn merged commit 487cb65 into main Jan 13, 2026
3 checks passed
@gordonkoehn gordonkoehn deleted the fix/normalize-api-url-trailing-slash branch January 13, 2026 10:00
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