PFS2: Difference between revisions
Jump to navigation
Jump to search
m (fixed link to PFS) |
No edit summary |
||
| Line 1: | Line 1: | ||
== Request == | == Request == | ||
== Response == | == Response == | ||
| Line 33: | Line 29: | ||
} ] | } ] | ||
} ] | } ] | ||
= Q&A = | |||
* What is the API for a request in PFS2? | |||
** Will add this to the "request" section but it will look a lot like a cross between the extension update service and the URLs used for PFS currently | |||
* Is it a GET with query string like [[PFS]], or is it a POST with a JSON encoded body (like one below with less info)? | |||
** I think it's pretty easy to handle either case, but since we'd potentially be dealing with arrays of plugins I'd opt to accept a JSON body and have the app run logic on it. | |||
** One argument against using POST is that doing so doesn't give you a good cache hit rate and could possibly crush the service doing operations that otherwise could be easily cached (albeit with an increase in HTTP requests). | |||
* Will there be a batch request mode, or 1 request per plugin? | |||
** Leaning towards 1 request per plugin at this point, but we should take some time to figure out which solution is best. | |||
Revision as of 00:11, 11 March 2009
Request
Response
Is the following data a sample of the JSON output of PFS2?
[ {
"name" : "Plugin",
"version" : "1.0",
"filename" : "plugin.dll",
"vendor" : "Mozilla",
"url" : "http://mozilla.com/",
"icon_url" : "http://mozilla.com/favicon.ico",
"latest_version" : "1.0",
"installer_location" : "http://mozilla.com/installer.exe",
"installer_hash" : "sha256:592eca7e6f2731c65e344c4514bd7efa0a7ec8a203d97b4f5aadb14c44379178",
"installer_shows_ui" : "false",
"license_url" : "http://mozilla.com/license.html",
"needs_restart" : "true",
"description" : "This is a Mozilla plugin that does things.",
"platforms" : [
{ "name" : "Mac OSX" },
{ "name" : "Windows NT 6.0" }
],
"xpcomabi" : "x86",
"mime_types" : [ {
"mime" : "text/plain",
"description" : "HTML",
"suffixes" : ".html, .xhtml, .htm"
} ]
} ]
Q&A
- What is the API for a request in PFS2?
- Will add this to the "request" section but it will look a lot like a cross between the extension update service and the URLs used for PFS currently
- Is it a GET with query string like PFS, or is it a POST with a JSON encoded body (like one below with less info)?
- I think it's pretty easy to handle either case, but since we'd potentially be dealing with arrays of plugins I'd opt to accept a JSON body and have the app run logic on it.
- One argument against using POST is that doing so doesn't give you a good cache hit rate and could possibly crush the service doing operations that otherwise could be easily cached (albeit with an increase in HTTP requests).
- Will there be a batch request mode, or 1 request per plugin?
- Leaning towards 1 request per plugin at this point, but we should take some time to figure out which solution is best.