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
How to handle server plugins #45
Comments
Hi @mehmetbilgin , The best way to do it is to write a neoclient extension. I need definitely to write a blog post about how to do it and link it into the doc. In the meantime, you may want to look how I created extensions for spatial and timetree : |
I managed to write the extension looking at the examples you gave, but my unchecked extension returning json stream. Looks like setting header option "Accept: application/json" (in GuzzleHttpClient.php) causing error with the request. |
Hello @mehmetbilgin , Thanks for your feedback. You mark a good point, the client is made to send only json http requests. I will try to find a "temporary fix" for the 2.x version of the client. Thanks for using the library and to report here. |
I have pushed a new branch "custom-headers", if you would like to see if it fit your needs it would be cool. How it works ?In the execute method of your new Command you can now pass a last parameter to the public function execute()
{
return $this->process(self::METHOD, self::PATH, $this->prepareBody(), $this->connection, null, $this->queryMode, $headers);
} $headers has to be an array of headers where keys are the header name and value the header value, it will override default headers the GuzzleHttpClient has. e.g. :
|
Thanks for the quick fix. I will be able to try it tomorrow and let you know the outcome. |
Thank you. |
Sorry for delayed response. |
Cool. Yes I will merge it in 2.x |
This has been merged into master, and released with 2.1.14 tag |
Hi Christophe,
I wrote a server plugin and I want to call this new plugin using your bundle.
Is it possible? Do I need to create a new command (that extends AbstractCommand)?
The text was updated successfully, but these errors were encountered: