Http binding for the first time ;)

I need some help with first time usage of http binding.

i want to change settings of a camera device depending on different item in openhab. i am able to GET/PUT working request from postman

1/ i have created a thing and channel

UID: http:url:ba64a0e3be
label: Turn ON audible alarm on Ogród
thingTypeUID: http:url
configuration:
  authMode: DIGEST
  ignoreSSLErrors: false
  baseURL: http://10.8.0.6:8002/ISAPI/Event/triggers/notifications/AudioAlarm?format=json
  password: password
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: PUT
  contentType: application/json
  timeout: 3000
  bufferSize: 2048
  username: admin
location: Ogród
channels:
  - id: ON
    channelTypeUID: http:string
    label: ON
    description: ""
    configuration:
      mode: WRITEONLY
      stateContent: '{fixed_JSON_HERE}'

2/ The logic should be like this:

if item1 receives command ON send “this request” if item1 receives command OD send “other request”.

only difference between this request is json body content.

below postman config:
PUT http://10.8.0.6:8002/ISAPI/Event/triggers/notifications/AudioAlarm?format=json
authorization Username: login, Password: password
Body: raw / json {“test json”}

help will be appreciated :slight_smile:

ok, i think i am a step further sending the request gives me
Requesting ‘http://10.30.1.182/ISAPI/Event/triggers/notifications/AudioAlarm?format=json’ (method=‘PUT’, content=‘org.eclipse.jetty.client.util.StringContentProvider@76641612’) failed: Authorization error
19:59:27.011 [DEBUG] [inding.http.internal.HttpThingHandler] - Cleared authentication result for ‘http://10.30.1.182/ISAPI/Event/triggers/notifications/AudioAlarm?format=json’, retrying immediately

not sure why. Admin and password 100% ok, Digest. in postman it is the same.
@moody_blue saw your post with digest problem also on hikvision. Did you solve it ?

ok it’s working - it shows an error but then retry with auth and it is sucesfull.