Кто-нибудь, пожалуйста, помогите мне?Я установил его и протестировал API coinbase, и все было в порядке
F:\curl\bin>curl https://api.coinbase.com/v2/prices/spot?currency=USD
{"data":{"base":"BTC","currency":"USD","amount":"7268.29"},"warnings":
[{"id":"missing_version","message":"Please supply API version (YYYY-MM-DD)
as CB-VERSION
header","url":"https://developers.coinbase.com/api#versioning"}]}
Но при использовании cURL на некоторых других API, к сожалению, cURL отстой и, например, когда я являюсь API какого-то веб-сайта с этими строками:
curl -X POST \
--header "X-Backtory-Authentication-Id: 5b0baf0de4b0988b2cea3438" \
--header "X-Backtory-Authentication-Key: 5b0baf0de4b0f80a3dc1d30a" \
-F "username=divar" \
-F "password=123" \
https://api.backtory.com/auth/login
результат:
F:\curl\bin> curl -X POST \
Invoke-WebRequest : A parameter cannot be found that matches parameter name
'X'.
At line:1 char:6
+ curl -X POST \
+ ~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest],
ParameterBindingException
+ FullyQualifiedErrorId :
NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS F:\curl\bin> --header "X-Backtory-Authentication-Id:
5b0baf0de4b0988b2cea3438" \
At line:1 char:7
+ --header "X-Backtory-Authentication-Id: 5b0baf0de4b0988b2cea3438" ...
+ ~
Missing expression after unary operator '--'.
At line:1 char:7
+ --header "X-Backtory-Authentication-Id: 5b0baf0de4b0988b2cea3438" ...
+ ~~~~~~
Unexpected token 'header' in expression or statement.
+ CategoryInfo : ParserError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
PS F:\curl\bin> --header "X-Backtory-Authentication-Key:
5b0baf0de4b0f80a3dc1d30a" \
At line:1 char:7
+ --header "X-Backtory-Authentication-Key: 5b0baf0de4b0f80a3dc1d30a ...
+ ~
Missing expression after unary operator '--'.
At line:1 char:7
+ --header "X-Backtory-Authentication-Key: 5b0baf0de4b0f80a3dc1d30a ...
+ ~~~~~~
Unexpected token 'header' in expression or statement.
+ CategoryInfo : ParserError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
PS F:\curl\bin> -F "username=divar" \
-F : The term '-F' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:5
+ -F "username=divar" \
+ ~~
+ CategoryInfo : ObjectNotFound: (-F:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS F:\curl\bin> -F "password=123" \
-F : The term '-F' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:5
+ -F "password=123" \
+ ~~
+ CategoryInfo : ObjectNotFound: (-F:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Что с ним не так?Я использую API где-то еще, и проблема та же, и она не возвращает никаких результатов, но ошибки