Autoit curl
DB CAFE
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
1 윈도우 파알 다운로드[편집]
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
2 autoit 적용 소스[편집]
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)
3 curl 사용법[편집]
exam) https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html
본인이 테스트하려는 쿼리는 -XGET 'localhost:9200/mctest_ilhee/_analyze' -d '{ "analyzer" : "ilhee_Custom", "text"" : "this is a test"}'. 위의 값 대로 cURL 에 넣어보자! 에러가 나온다. 몇 번의 삽질.. 끝에 알아 낸 결과 ★★★★★ ' -> "로 "-> "" 로 변경을 해야한다.
ilhee_Custome 을 적용한 데이터가 잘 나오는 것을 확인할 수 있다. ilhee_Custome 은 ElasticSearch 글 내의 분석기 관련 글에서 확인할 수 있다.
cURL 은 ". ' 와 같은 부분을 잘 check 해서 쓰면 된다. cURL 사용법은" cURL --help " 로 원하는 매개변수를 잘 찾아쓰면 된다.