axios / axios

Promise based HTTP client for the browser and node.js
https://axios-http.com
MIT License
105.83k stars 10.97k forks source link

Axios API 一节中axios(url,[config])错误 #6422

Open knightmdy opened 5 months ago

knightmdy commented 5 months ago

Describe the bug

axios(url[,config])应该改为axios(url,[config])。

To Reproduce

No response

Code snippet

No response

Expected behavior

No response

Axios Version

No response

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

VaiorettoEvagaden commented 5 months ago

The comma inside the brackets indicates that when you provide the second parameter, it needs to be separated by a comma. It emphasizes that the config parameter is optional, but if used, it must be separated from the first parameter by a comma. Below is a generic example. image

kkuanhui commented 4 months ago

You can find the discussion in this thread: stackoverflow: what-do-the-brackets-around-the-arguments-mean