I am trying to use wwHttp for REST API services. I don't see GET and POST methods which are utilized in all the examples including code snippets in these forums. I see Httpget and Send methods - but since GET and POST are everywhere - I am wondering maybe I am missing something. Thanx
It's in newer versions of the client tools - v7 onwards I think is when these got added. The new methods are just proxy wrappers around HttpGet()
.
You can use HttpGet()
with older versions - it's just a little more verbose as you have to explicit AddPostKey()
set the content type etc.
+++ Rick ---
Thank you, Rick! Now it makes sense, so I use AddPostKey() and then should use Send?
There's no Send()
in old versions. HttpGet()
is the underlying method that does the work.
+++ Rick ---
I am sorry, I meant implementing http post. I am doing a set of AddPostKey and then what to POST to the server?
It doesn't matter. .HttpGet()
is the low level method that does everything. .Send()
was added recently for clarity as the low level method. Even for POST
(or any other verb) you need to use .HttpGet()
.
Or maybe it's time to update to a more recent version of the Client Tools 😃 There are lots of improvements especially for calling REST services and JSON parsing support.
+++ Rick ---