Skip to main content
1-Visitor
January 27, 2017
Question

response.Content = null

  • January 27, 2017
  • 1 reply
  • 1160 views

I am trying to make c# call to thingworx using http client with url:

http://localhost/Thingworx/things/thingName/properties/propertyName&appkey

I am able to get property value in to response object. but when I use it like, value = response.content.Tostring()

it is showing content is null.

Please help me how to get the property value into my c# value field.

1 reply

5-Regular Member
February 6, 2017

How are you making this REST call? Are you configuring it as a GET or a POST? This particular rest call is a GET, and the syntax should look like this:

http://<server>:<port>/Thingworx/Things/<thingName>/Properties/<propertyName>?appKey=f0e7905d-771d-4eb7-869c-c4acbe7d2ce4

replace each < ... > with the relevant information from your environment. Your appKey is a parameter while your property name is not. If you were doing a POST, and the property name was a parameter also, then you would put the ? before the property name and leave the ampersand & as it is written.