Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Accessing a service

Revision as of 18:25, 7 February 2012 by Margolis.us.ibm.com (Talk | contribs) (New page: '''Calling a REST service''' <source lang="java"> http HttpRest{request.uri="http:host\\myService"}; srvc IRest?; srvc = ServiceLib.completeBind(srvc, http); </source> '''Accessing HTT...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Calling a REST service

http HttpRest{request.uri="http:host\\myService"};
srvc IRest?;
srvc = ServiceLib.completeBind(srvc, http);

Accessing HTTP request headers

http HttpRest{};
http.request.headers = new Dictionary { param1 = "a value to pass to my service" };
srvc IRest?{@Resource {}};
srvc = ServiceLib.completeBind(srvc, http);

HTTP request and response

function invokeDoSomething()
    call srvc.doSomething() returning to serviceCallback;
end
 
function serviceCallback(returnValueOne String, callbackHttp IHTTP in)
  // process callback request or response
end

Back to the top