View previous topic :: View next topic |
Author |
Message |
totte
Joined: 30 May 2007 Posts: 55
|
Posted: Wed Oct 06, 2021 1:57 am Post subject: %ODBCField2% in HTTP post request inserts \ |
|
|
Hi
I have an ODBC test returning 2 varchars, I use the variable %ODBCField2% in an http POST alert profile
The reply value in hostmonitor is {"user":"kalle"}. When using this in the alertprofile to post to the api {\"user\":\"kalle\"} is sent.
//t |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12800 Location: USA
|
Posted: Wed Oct 06, 2021 11:20 am Post subject: |
|
|
I assume you set "content-type: application/json" line in HTTP header?
Then HostMonitor translates variable value according to JSON encoding rules. If your database reruns JSON compatible strings, I would suggest to remove such HTTP header.
Regards
Alex |
|
Back to top |
|
|
totte
Joined: 30 May 2007 Posts: 55
|
Posted: Thu Oct 07, 2021 3:19 am Post subject: |
|
|
Hi,
But then i get html tags like %7B%22user%22%3A%22kalle%20johansson%22%7D
/t |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12800 Location: USA
|
Posted: Thu Oct 07, 2021 7:06 am Post subject: |
|
|
We can add switch, some HTTP header like "hmvars: text", as "do not encode values" indicator.
Please contact support (by e-mail) in order to receive update.
Regards
Alex |
|
Back to top |
|
|
|