mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(rpc): support POST method
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
26f0b014f9
commit
2dfa41c9a5
3 changed files with 75 additions and 16 deletions
16
doc/rpc.txt
16
doc/rpc.txt
|
@ -28,6 +28,22 @@ Package information can be obtained by issuing HTTP GET requests of the form
|
|||
+/rpc?v=5&type=info&arg[]=_pkg1_&arg[]=_pkg2_&...+ where _pkg1_, _pkg2_, ...
|
||||
are the names of packages to retrieve package details for.
|
||||
|
||||
Request Types
|
||||
-------------
|
||||
|
||||
The GET method here parses arguments in an odd way due to `v=5` historically
|
||||
supporting this ordering. Later versions will remove support for this kind
|
||||
of parsing, and the POST method is our first step toward solving it.
|
||||
|
||||
* `GET`
|
||||
- Search arguments are constructed using the last found argument(s).
|
||||
If the last related argument is `arg[]`, we collect arguments from
|
||||
end to start until we hit a non-`arg[]` argument. If the last related
|
||||
argument is `arg`, it used as the one and only argument.
|
||||
* `POST`
|
||||
- Search arguments are constructed using `[arg] + args` where
|
||||
`args == arg[]`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue