-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Provide easier support for empty targets #98
Milestone
Comments
If there's interest in this sort of change, I'd be happy to put together a pull request. |
I recently found a case where this type of usage would aid unit testing. |
Looks sensible |
codefromthecrypt
pushed a commit
that referenced
this issue
Feb 1, 2015
Supports cases when the base url isn't known until runtime. Closes #98
on the way.. #157 |
codefromthecrypt
pushed a commit
that referenced
this issue
Feb 1, 2015
Supports cases when the base url isn't known until runtime. Closes #98
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In some cases, it may be useful to have Feign instances that don't have any base URL at all. Instead, all methods would include a URI parameter.
Currently, this can be accomplished by using a custom implementation of Target that requires a URL to be provided. I've included an example below. This target can then be passed to
Feign.builder().target(Target)
Feign.create(Target, Object...)
.If such an EmptyTarget were included in feign-core, we could add signatures like
Feign.builder().target(Class)
that allow creating Feign instances without a base URL and without explicitly specifying a Target type. A signature forFeign.create
will require a bit more thought, sinceFeign.create(Class, Object...)
would conflict with the pre-existingFeign.create(Class, String, Object...)
.The text was updated successfully, but these errors were encountered: