West Wind Internet Protocols
CreatewwHttp Call
Gravatar is a globally recognized avatar based on your email address. CreatewwHttp Call
  Roger Bradshaw
  All
  Mar 18, 2017 @ 04:32pm

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")

Gravatar is a globally recognized avatar based on your email address. re: CreatewwHttp Call
  Rick Strahl
  Roger Bradshaw
  Mar 18, 2017 @ 08:18pm

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 ---

Gravatar is a globally recognized avatar based on your email address. re: CreatewwHttp Call
  Roger Bradshaw
  Rick Strahl
  Mar 19, 2017 @ 04:17am

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?

Gravatar is a globally recognized avatar based on your email address. re: CreatewwHttp Call
  Rick Strahl
  Roger Bradshaw
  Mar 19, 2017 @ 03:33pm

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 ---

© 1996-2017