Flint provides out-of-the-box or ready to use workflows for HTTP request and response service. Here are the details of workflows/Flintbits for HTTP request and response -

Flintbox nameLocationSSH Flintbits
flint-utilhttps://github.com/getflint/flint-util.gitflint-util > http > operation

Available Flintbits

Perform all standard application operations available for HTTP request and response service, Some of them are listed below:

File available Flintbits

  • get.rb
  • post.rb
  • put.rb
  • delete.rb
  • patch.rb

Get_request

To Requests data from a specified resource

Input and output JSON for the Get_request

This section illustrates the Flintbit Input and output for Get request.

Sample Input JSON for the Get_request
{
"connector_name" : "http",
"url":"http://httpbin.org/get",
"headers":"Cache-Control: no-cache",
"is-proxy": "false"
}
Flintbit input elements for the Get_request
ParameterDescriptionrequired
connector_nameName of the HTTP Connector to be configured.true
url

HTTP Request URL

true
headersHTTP Request Body 
is-proxyRequest send with proxy or without proxy ,Boolean valuefalse
Sample JSON output for the Get_request
 {
  "meta": {
    "job-id": "job-189d058d-e582-4444-a7cd-a69ac3dd101b",
    "exit-code": 0,
    "context": "flint-util:http:operation:get.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470040934014,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "result": {
      "args": {},
      "headers": {
        "User-Agent": "AHC/1.0",
        "Host": "httpbin.org",
        "Accept": "*/*",
        "Content-Type": "text/html;charset=utf-8"
      },
      "url": "http://httpbin.org/get",
      "origin": "219.91.153.22"
    }
  }
}

Post_request

To submits data to be processed to a specified resource

Input and output JSON for the Post_request

This section illustrates the Flintbit Input and output for Post request.

Sample Input JSON for the Post_request
 {
"connector_name" : "http",
"url":"http://httpbin.org/post",
"body":"Welcome to Flint !!",
"is-proxy": "false"
}
Flintbit input elements for the Post_request
ParameterDescriptionrequired
connector_nameName of the HTTP Connector to be configured.true
url

HTTP Request URL

true
bodyHTTP Request Bodytrue
headersHTTP Request Headers 
is-proxyRequest send with proxy or without proxy ,Boolean valuefalse
Sample JSON output for the Post_request
 {
  "meta": {
    "job-id": "job-fcf37700-8b3d-43c4-b605-bfd58e94a483",
    "exit-code": 0,
    "context": "flint-util:http:operation:post.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470042475646,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "result": {
      "args": {},
      "headers": {
        "User-Agent": "AHC/1.0",
        "Host": "httpbin.org",
        "Accept": "*/*",
        "Content-Length": "19",
        "Content-Type": "text/html;charset=utf-8"
      },
      "data": "Welcome to Flint !!",
      "form": {},
      "origin": "219.91.153.22",
      "files": {},
      "json": null,
      "url": "http://httpbin.org/post"
    }
  }
}

Delete_request

To Deletes the specified resource

Input and output JSON for the Delete_request

This section illustrates the Flintbit Input and output for Delete request.

Sample Input JSON for the Delete_request
{
"connector_name" : "http",
"url":"http://httpbin.org/delete",
"body":"automating processes !",
"is-proxy": "false"
} 
Flintbit input elements for the Delete_request
ParameterDescriptionrequired
connector_nameName of the HTTP Connector to be configured.true
url

HTTP Request URL

true
bodyHTTP Request Bodytrue
headersHTTP Request Headers 
is-proxyRequest send with proxy or without proxy ,Boolean valuefalse
Sample JSON output for the Delete request
 {
  "meta": {
    "job-id": "job-e27bed8f-f98c-4446-b133-ad34d4481677",
    "exit-code": 0,
    "context": "flint-util:http:operation:delete.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470042710632,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "result": {
      "args": {},
      "headers": {
        "User-Agent": "AHC/1.0",
        "Host": "httpbin.org",
        "Accept": "*/*",
        "Content-Length": "22",
        "Content-Type": "text/html;charset=utf-8"
      },
      "data": "automating processes !",
      "form": {},
      "origin": "219.91.153.22",
      "files": {},
      "json": null,
      "url": "http://httpbin.org/delete"
    }
  }
}

Put_request

 To uploads a representation of the specified URI

 Input and output JSON for the Put_request

This section illustrates the Flintbit Input and output for Put_request.

Sample Input JSON for the Put_request
 {
"connector_name" : "http",
"url":"http://httpbin.org/put",
"body":"automating processes !",
"is-proxy": "false"
} 
Flintbit input elements for the Put_request
ParameterDescriptionrequired
connector_nameName of the HTTP Connector to be configured.true
url

HTTP Request URL

true
bodyHTTP Request Bodytrue
headersHTTP Request Headers 
is-proxyRequest send with proxy or without proxy ,Boolean valuefalse
Sample JSON output for the Put_request
 {
  "meta": {
    "job-id": "job-e1249a98-1502-44dd-ad2c-520bac12eb25",
    "exit-code": 0,
    "context": "flint-util:http:operation:put.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470042778084,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "result": {
      "args": {},
      "headers": {
        "User-Agent": "AHC/1.0",
        "Host": "httpbin.org",
        "Accept": "*/*",
        "Content-Length": "22",
        "Content-Type": "text/html;charset=utf-8"
      },
      "data": "automating processes !",
      "form": {},
      "origin": "219.91.153.22",
      "files": {},
      "json": null,
      "url": "http://httpbin.org/put"
    }
  }
}

Patch_request

To make set of changes described in the request entity be applied to the resource

Input and output JSON for the Patch_request

This section illustrates the Flintbit Input and output for Patch request.

Sample Input JSON for the Patch_request
 {
"connector_name" : "http",
"url":"http://httpbin.org/patch",
"body":"automating processes !",
"is-proxy": "false"
} 
Flintbit input elements for the Patch_request
ParameterDescriptionrequired
connector_nameName of the HTTP Connector to be configured.true
url

HTTP Request URL

true
bodyHTTP Request Bodytrue
headersHTTP Request Headers 
is-proxyRequest send with proxy or without proxy ,Boolean valuefalse
Sample JSON output for the Patch_request
 {
  "meta": {
    "job-id": "job-fcdc68fc-05e7-41cb-9e56-7708711d4696",
    "exit-code": 0,
    "context": "flint-util:http:operation:patch.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470042852069,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "result": {
      "args": {},
      "headers": {
        "User-Agent": "AHC/1.0",
        "Host": "httpbin.org",
        "Accept": "*/*",
        "Content-Length": "22",
        "Content-Type": "text/html;charset=utf-8"
      },
      "data": "automating processes !",
      "form": {},
      "origin": "219.91.153.22",
      "files": {},
      "json": null,
      "url": "http://httpbin.org/patch"
    }
  }
}

On this page: