Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (23 sloc) 594 Bytes
layout title icon group
samples
HTTP Request
fa-caret-right
simple

{{ page.title }}

Steps

  1. Create a project http_service_project.
  2. Then create a JavaScript service named http_service.js.
  3. Within the service code, enter the following content:

Simple HTTP Service

var request = require('http/v3/request');
var response = require('http/v3/response');

var method = request.getMethod();

response.println("[Method]: " + method);
response.flush();
response.close();

For more information, see the API documentation.