"node.js 인 액션" 책 보다가 검색
cURL에서 -X 옵션을 주면 된다
$ curl -X GET http://127.0.0.1:3000/api/users/bakyeono $ curl -X POST http://127.0.0.1:3000/api/languages/ansi-common-lisp $ curl -X PUT http://127.0.0.1:3000/api/resources/1789 |
[링크 : https://bakyeono.net/post/2016-05-02-rest-api-client-for-cli.html]
-X/--request <command> (HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more. (FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP. If this option is used several times, the last one will be used. |
[링크 : https://linux.die.net/man/1/curl]
'Programming > node.js' 카테고리의 다른 글
node-rtsp-stream 윈도우에서 설치하기는 실패? (0) | 2018.09.11 |
---|---|
node.js HTTP 요청하기 (0) | 2018.09.10 |
node.js rtsp 스트리밍 (0) | 2018.09.07 |
RESTful (0) | 2018.09.07 |
node.js jwt -JSON Web Token (0) | 2018.09.07 |