I'm very interested in using CreatewwHttp to add a header proir to the CallService call. But, I'm getting an error that the CreatewwHttp property cannot be found.
loProxy = CREATEOBJECT("wwJsonServiceClient")
loHttp = CREATEOBJECT("wwHttp")
loHttp.AddHeader("Authorization: Bearer "+pcToken)
*** Pass it to the proxy to use
loProxy.CreatewwHttp(loHttp)
loGetResp = loProxy.CallService("https://raceroster.com/api/v1/events/1a6a5d79-2873-11/results","","GET")
If you're using the Client Tools I don't think this feature is the current version yet. The feature was added more recently and currently only exist in the shipped version in West Wind Web Connection.
I wil be updating the Client Tools when I get some time but no set date as of yet.
+++ Rick ---
I started down this road because in the project I'm working on, the API documentation mentions REST. Most of the activity is documented in POST, PUT, GET and DELETE calls. The DELETE works great using wwServiceClient, but I had to put the autorization header in the URL. Is there a way to send headers and posting keys?
Not in the prior version - this is why I added CreatewwHttp to add that functionality. wwJsonService is one of the newest classes in the framework and we were still discovering how it's used by people. I ran into this issue more recently when this was fixed.
It'll be in the next update, but as I said - currently I don't have an ETA for when that will be, but soon.
+++ Rick ---