Skip to main content
1-Visitor
October 11, 2018
Solved

Error occurred while validating HTTP header: user-agent

  • October 11, 2018
  • 1 reply
  • 2818 views

Under which circumstances ThingWorx generates this errors when interacting with it using the REST API?

 

My Application log is full of this messages that appear more than one time per request. Also when I try to set properties using the REST API I realise some properties are not set if this error appears. 

Best answer by jcborras

I haven't used postman and I am closing this issue since I tracked down the problem to loose JSON management. As a matter of fact I can't even prove without a hint of doubt that user agent based validation was related.

Thanks for your support anyway. Appreciated.

1 reply

20-Turquoise
October 11, 2018

What is your ThingWorx version? Could you please try this in a different browser too, to see if the error persists? 

What particular rest call triggers the error?

jcborras1-VisitorAuthor
1-Visitor
October 15, 2018

Using the REST API (automated property setting) so using a different browser is out of the question.

The annoying thing is that the REST call does not trigger an error (the resulting status code is 200, OK). Surprisingly enough the property value is not set.

For the record, my request is a PUT request against url https://myserver/Thingworx/Things/MyThing/Properties/*

The body of the request is of JSON type with content  {"PropertyName": {"object": [...]}}

The module I use for wrapping the REST access is heavily unit tested with similar case having been tried over and over.

Affected ThingWorx versions are 7.4.5-b33 and 8.2.1-b140

20-Turquoise
November 2, 2018

I apologize for the delayred response.Does it work with Postman? I just want to test it with a different tool to ensure it's not the structure issue.