문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다: 사용자.
https://www.autoitscript.com/forum/topic/162599-can-someone-please-show-me-how-to-use-curl-and-autoit/ == 윈도우용 다운로드 == 64bit https://curl.haxx.se/windows/dl-7.69.1_1/curl-7.69.1_1-win64-mingw.zip 32bit https://curl.haxx.se/windows/dl-7.69.1_1/curl-7.69.1_1-win32-mingw.zip == autoit 적용 소스 == <source lang=c> Dim $iPidCurl = Run(@ComSpec & " /c " & 'curl -i -H' & 'Content-Type: application/x-www-form-urlencoded' & 'https://api.edmunds.com/inventory/token' & '-X POST -d ' & 'client_id=<MY SECRET ID >'&' -d ' & 'client_secret=<MY SECRET PHRASE>' & ' -d ' &'grant_type=client_credentials', @ScriptDir, @SW_HIDE,2+4) Dim $sOut While 1 $sOut &= StdoutRead($iPidCurl) If @error Then ExitLoop WEnd While 1 $sOut &= StderrRead($iPidCurl) If @error Then ExitLoop WEnd ConsoleWrite($sOut&@LF&"*********"&@LF) </source> == curl 사용법 == === 자주 사용하는 옵션 3가지 === -d, --data: <data> Send specified data in POST request. -H, --header: <header> Headers to supply with request. -X, --request: The request method to use. ex) GET, POST [GET방식] <source lang=shell> curl -d "key1=value1&key2=value2" \ -H "Content-Type: application/x-www-form-urlencoded" \ -X GET http://localhost:8000/data </source> [POST방식] <source lang=shell> [URL형식 데이터] curl -d "key1=value1&key2=value2" \ -H "Content-Type: application/x-www-form-urlencoded" \ -X POST http://localhost:8000/data [JSON형식 데이터] curl -d '{"key1":"value1", "key2":"value2"}' \ -H "Content-Type: application/json" \ -X POST http://localhost:8000/data </source> # 원도우 curl에서는 '를 "로 변경하고, "를 ""로 변경하고 호출해야한다. <source lang=shell> curl -d "{""key1"":""value1"", ""key2"":""value2""}" \ -H "Content-Type: application/json" \ -X POST http://localhost:8000/data </source> ;~ $bidtest = "https://buy.auction.co.kr/buy/bidlist.aspx?ItemNo=C045907557" [[category:autoit]]
문서 저장 미리 보기 차이 보기 취소