cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Invoking Service with POST in header is not working

arunkumar1
1-Newbie

Invoking Service with POST in header is not working

Hi,

I'm using ThingWorx 6.5.0-b66. I guess with this version, we no more required to mention POST in query parameter.

But mentioning the POST method in header doesn't work;

   > curl -X POST -u username:password "http://localhost/Thingworx/Things/TestDataTable/Services/TestService?Accept=application/json"

However, it only works when I mention in query parameter as shown below:

   > curl -X GET -u username:password "http://localhost/Thingworx/Things/TestDataTable/Services/TestService?method=post&Accept=application/json"


Regards

Arunkumar D


1 ACCEPTED SOLUTION

Accepted Solutions

I got it working.

I'm posting this just in case if it helps someone.

   > curl -X POST -H "appKey:my-app-key" -H "Accept:application/json" -H "Content-Type:application/json" "http://localhost/Thingworx/Things/TestDataTable/Services/TestService"

View solution in original post

1 REPLY 1

I got it working.

I'm posting this just in case if it helps someone.

   > curl -X POST -H "appKey:my-app-key" -H "Accept:application/json" -H "Content-Type:application/json" "http://localhost/Thingworx/Things/TestDataTable/Services/TestService"

Top Tags