Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for custom host #159

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

emmanuelay
Copy link
Contributor

@emmanuelay emmanuelay commented Dec 22, 2024

This PR makes it possible to customize the host on each request.
Like this:

	apitest.New().
		Handler(handler).
		Host("demo.example.com").
		Get("/hello").
		Expect(t).
		Status(http.StatusOK).
		End()

I added this to facilitate testing a solution where the subdomain slug is used as a key to retrieve data needed in the handler.

@emmanuelay
Copy link
Contributor Author

What do you think @steinfletcher ?

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