1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +08:00

1242 Commits

Author SHA1 Message Date
e57cd9b857 commands/http: Use net/url querystring encoder 2014-11-04 02:04:51 -08:00
33b0990a3a commands/http: Cleaner URL formation in client 2014-11-04 02:04:51 -08:00
5e5d534eb3 commands/http: Refactored API to a Client object that takes a string address 2014-11-04 02:04:50 -08:00
2a1116cec8 commands: Allow overriding marshaller for any encoding type 2014-11-04 02:04:50 -08:00
33ad56e6d0 commands: Safer type coercion when choosing marshaller 2014-11-04 02:04:50 -08:00
0149f65c6c commands: Replaced 'Formatter' with 'Marshaller' 2014-11-04 02:04:50 -08:00
068e10cc5d commands/cli: Better comment for parsePath 2014-11-04 02:04:50 -08:00
958e524c1e commands: Nicer syntax for Argument definition 2014-11-04 02:04:50 -08:00
f76048f74b commands/http: Unexported Handler fields and created constructor 2014-11-04 02:04:50 -08:00
4552fce517 commands/http: Respond with error if encoding option isn't a string 2014-11-04 02:04:50 -08:00
446acdcdb5 commands/http: Ensure request URLs start with expected prefix 2014-11-04 02:04:50 -08:00
bc6938dc08 commands: Cleaned up argument validation 2014-11-04 02:04:49 -08:00
f6c38882f0 commands: Return a reader in a Response#Reader method, instead of making Response implementing io.Reader 2014-11-04 02:04:49 -08:00
69a56de040 commands: Renamed Response#Value to Response#Output 2014-11-04 02:04:49 -08:00
75649f3d49 commands: Moved argument checking into a Command method, fail early when parsing commands 2014-11-04 02:04:49 -08:00
dbeffb6a0b commands: CLI Parse: Don't parse args until after creating request 2014-11-04 02:04:49 -08:00
586a019fbf commands: Fixed Request#CheckArguments not erroring when required arguments were missing 2014-11-04 02:04:49 -08:00
405cfd9762 commands/http: Made parser/client handle variadic arguments 2014-11-04 02:04:49 -08:00
2c8fc8564c commands/cli: Made parser handle variadic arguments 2014-11-04 02:04:49 -08:00
e8d0cbff1d commands: Check argument validity when running commands 2014-11-04 02:04:49 -08:00
ee2c76992a commands/cli: Open argument files when creating Requests (Moved out of HTTP client) 2014-11-04 02:04:48 -08:00
f7aa2b9f10 commands: Renamed ArgPath to ArgFile 2014-11-04 02:04:48 -08:00
40858b43ed commands/http: Added stream argument handling to client and request parser 2014-11-04 02:04:48 -08:00
39c78fbe06 commands: Fixed tests 2014-11-04 02:04:48 -08:00
3a8d60cc61 commands: Removed inpout stream from Request 2014-11-04 02:04:48 -08:00
827f1dd0b0 commands: Changed Request arguments to a []interface{} 2014-11-04 02:04:48 -08:00
30e968754e commands/cli: Error if no subcommand matched 2014-11-04 02:04:48 -08:00
83b2ba00e9 commands: Removed Command#Private field 2014-11-04 02:04:48 -08:00
c0d3edd4f9 commands/cli: Made Parse handle multiple root commands 2014-11-04 02:04:47 -08:00
cfa56dde82 commands/http: Error if trying to run private command 2014-11-04 02:04:47 -08:00
abcebb0bc2 commands/http: Improved client error handling 2014-11-04 02:04:47 -08:00
ea09268044 commands/http: 404 when trying to call root command 2014-11-04 02:04:47 -08:00
1e0cabd4db commands/http: Pass root command in as field instead of statically depending on core/commands 2014-11-04 02:04:47 -08:00
460387fc3b commands: Added 'Private' field to Command 2014-11-04 02:04:47 -08:00
b61cfd9224 commands: Don't error when marshalling empty Responses 2014-11-04 02:04:47 -08:00
4911dc069a refactor(commands) swap argument order to match Http(w, r) idiom 2014-11-04 02:04:47 -08:00
b1bf60b877 fix(cmd/ipfs2, commands) imports 2014-11-04 02:04:46 -08:00
c0a9871d48 commands/http: Made HTTP client unmarshal response values based on the Command#Type 2014-11-04 02:04:46 -08:00
ef290faa88 commands: Added a Type field for defining output struct formats 2014-11-04 02:04:46 -08:00
6302356e15 commands: Fixed tests 2014-11-04 02:04:46 -08:00
32a2959348 commands/http: Don't try to parse HTTP response into a Response, just read the output 2014-11-04 02:04:46 -08:00
714e13b63a commands/http: Explicitly define the MIME types for each encoding 2014-11-04 02:04:46 -08:00
b54801cc10 commands: Added plaintext marshalling to Response#Marshal() 2014-11-04 02:04:46 -08:00
38f8f1c279 commands: Added a Format function to Command, for creating human-readable output based on a Response 2014-11-04 02:04:46 -08:00
81f29257a1 commands: Gave Requests a reference to the command they are being called on 2014-11-04 02:04:46 -08:00
507192ef6e commands/http: Use request body as command input stream 2014-11-04 02:04:45 -08:00
42633e5d40 commands/http: Send request arguments in client requests 2014-11-04 02:04:45 -08:00
753162529a commands/http: Parse command args 2014-11-04 02:04:45 -08:00
52bc8bd422 commands/http: Moved http request parsing into a Parse function 2014-11-04 02:04:45 -08:00
29b96b64a5 commands/http: Made Handler set request contexts 2014-11-04 02:04:45 -08:00