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/1",$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/1
Postman Collection Item JSON
{
"name": "Get article",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{webservice_url}}/api/articles/{{articleId}}",
"host": [
"{{webservice_url}}"
],
"path": [
"api",
"articles",
"{{articleId}}"
]
}
},
"response": [
]
}