-
Notifications
You must be signed in to change notification settings - Fork 50
Add BaseUriPlugin support. ISSUE-235 #240
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
Changes from 1 commit
c51720a
f7aa143
d44c8d5
601953c
b1257a0
75ab4b3
e22007b
cbde5ea
3b3629c
45380b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,6 +298,22 @@ private function createClientPluginNode() | |
->end() | ||
->end() | ||
->end() | ||
->arrayNode('base_uri') | ||
->canBeEnabled() | ||
->addDefaultsIfNotSet() | ||
->info('Set scheme, host and port in the request URI.') | ||
->children() | ||
->scalarNode('host') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
->info('Host name including protocol and optionally the port number, e.g. https://api.local:8000') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, we should talk about being able to have a path |
||
->isRequired() | ||
->cannotBeEmpty() | ||
->end() | ||
->scalarNode('replace') | ||
->info('Whether to replace the host if request already specifies one') | ||
->defaultValue(false) | ||
->end() | ||
->end() | ||
->end() | ||
->arrayNode('header_append') | ||
->canBeEnabled() | ||
->info('Append headers to the request. If the header already exists the value will be appended to the current value.') | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,13 @@ private function configurePluginByName($name, Definition $definition, array $con | |
$definition->replaceArgument(1, [ | ||
'replace' => $config['replace'], | ||
]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing break There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you still need to add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dbu I fixed all review, can you please review my PR? |
||
case 'base_uri': | ||
$baseService = $serviceId.'.host_uri'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't that be |
||
$this->createUri($container, $baseService, $config['host']); | ||
$definition->replaceArgument(0, new Reference($uriService)); | ||
$definition->replaceArgument(1, [ | ||
'replace' => $config['replace'], | ||
]); | ||
|
||
break; | ||
case 'header_append': | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change this to "Set a bast URI to the request-"