KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

%ODBCField2% in HTTP post request inserts \

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
totte



Joined: 30 May 2007
Posts: 55

PostPosted: Wed Oct 06, 2021 1:57 am    Post subject: %ODBCField2% in HTTP post request inserts \ Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12790
Location: USA

PostPosted: Wed Oct 06, 2021 11:20 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
totte



Joined: 30 May 2007
Posts: 55

PostPosted: Thu Oct 07, 2021 3:19 am    Post subject: Reply with quote

Hi,

But then i get html tags like %7B%22user%22%3A%22kalle%20johansson%22%7D


/t
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12790
Location: USA

PostPosted: Thu Oct 07, 2021 7:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index