Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:client_coding:connector_http_server [2017/01/14 18:15] adomasvendev:client_coding:connector_http_server [2019/06/19 19:49] (current) bwiernik
Line 1: Line 1:
-Zotero has a built-in HTTP server designed to communicate with the Safari and Chrome extensions, called Connector. This HTTP server is enabled by default in Zotero Standalone and it can be enabled for Zotero in Firefox by setting ''extensions.zotero.httpServer.enabled'' to ''true'' in about:config. See the [[kb/httpserver enabled|knowledge base article]].+====== Zotero Connector HTTP Server ====== 
 + 
 +Zotero has a built-in HTTP server to communicate with the [[/support/standalone#zotero_connectors|Zotero Connector]] browser extensions.
  
 The connector server defines several endpoints by default, including: The connector server defines several endpoints by default, including:
Line 9: Line 11:
   * ''/connector/ping''   * ''/connector/ping''
  
-These endpoints are implemented in [[https://github.com/zotero/zotero/blob/master/chrome/content/zotero/xpcom/server_connector.js|server_connector.js]]. The server is implemented in [[https://github.com/zotero/zotero/blob/master/chrome/content/zotero/xpcom/server.js|server.js]].+These endpoints are implemented in [[https://github.com/zotero/zotero/blob/master/chrome/content/zotero/xpcom/connector/server_connector.js|server_connector.js]]. The server is implemented in [[https://github.com/zotero/zotero/blob/master/chrome/content/zotero/xpcom/server.js|server.js]].
  
 ====== Extending the Connector Server ====== ====== Extending the Connector Server ======
-The following code registers an additional endpoint with the built-in connector HTTP server.+The following code registers an additional endpoint with the connector server.
  
-This script must be run with chrome privileges. The best way to do this is to create an extension that [[https://developer.mozilla.org/en/XPCOM/Receiving_startup_notifications|registers an XPCOM service to run at Firefox startup]]. Firefox 4 users also have the option of creating a [[https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions|bootstrapped extension]]. Alternatively, you could register the endpoint from a overlay or from a chrome URI that you load manually.+This script must be run with chrome privileges. The best way to do this is to create an extension that [[https://web.archive.org/web/20190612191336/https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide/Receiving_startup_notifications|registers an XPCOM service to run at Zotero startup]]. This can (and should if possible) be a [[https://web.archive.org/web/20190613013728/https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Bootstrapped_extensions|bootstrapped extension]]. Alternatively, you could register the endpoint from a overlay or from a chrome URI that you load manually.
  
 Once registered, going to http://127.0.0.1:23119/myAddon/helloWorld in a web browser should produce a page containing "Hello world." Once registered, going to http://127.0.0.1:23119/myAddon/helloWorld in a web browser should produce a page containing "Hello world."
dev/client_coding/connector_http_server.txt · Last modified: 2019/06/19 19:49 by bwiernik