Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oHttp.BasicAuth = True
$oHttp.Login = "{{webservice_key}}"
$oHttp.Password = "password"
$oSbResponseBody = ObjCreate("Chilkat.StringBuilder")
$bSuccess = $oHttp.QuickGetSb("https://localhost:8080/api/articles",$oSbResponseBody)
If ($bSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite("Response status code = " & $oHttp.LastStatus & @CRLF)
ConsoleWrite($oSbResponseBody.GetAsString() & @CRLF)
Curl Command
curl -X GET
-u '{{webservice_key}}:password'
https://localhost:8080/api/articles
Postman Collection Item JSON
{
"name": "Get all articles",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{webservice_url}}/api/articles",
"host": [
"{{webservice_url}}"
],
"path": [
"api",
"articles"
]
}
},
"response": [
]
}