[-]
 [+]
  
 
[-]
  
  
  
  
  
  
  
  
  
  
  
 
 
Updated on 9/27/2019
Service Designer User's Guide
Http Request Node
Direct link to topic in this publication:

Http Request Node

The HTTP Request node is used to send or receive data from the remote server using HTTP requests. This node can also be used to make Rest API calls. 

How to Use

  • Open the Services editor window.
  • Click the Add Service button to add a new service or open an existing service.
  • In the Nodes palette, drag and drop a Http Request node to the workspace.
  • Drag and drop other nodes to create a flow.

Associated Attributes

HTTP Request Node properties
  • Name: Unique name for the node. This field accepts only string values with a length of length 5 - 50 characters.
  • A drop-down list displaying the type of HTTP request. If you want to map the HTTP request method to a bh.input, or bh.local variable, click the Map button, select the property, and input the variable name. HTTP requests include:
    • GET: The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. 
    • POST: The POST method is used to submit an entity to the specified resource, often causing a change in state on the server.
    • PUT: The PUT method replaces all current representations of the target resource with the request payload.
    • DELETE: The DELETE method deletes the specified resource.
    • PATCH: The PATCH method is used to apply partial modifications to a resource.
  • URL: The location of the resource to which you are making a HTTP request. If you want to map this field to a bh.input, or bh.local variable, click the Map button, select the property, and input the variable name.
  • Return Type: A drop-down list displaying the type of data the HTTP request returns. If you want to map this field to a bh.input, or bh.local variable, click the Map button, select the property, and input the variable name. The return type drop-down includes:
    • JSON: To receive the HTTP response in JSON format. The response is a JavaScript object created by parsing the contents of received data as JSON.
    • STRING: To receive the HTTP response in string format. 
    • BLOB: To receive the HTTP response in binary large object format. Blob represents a file-like object of immutable, raw data.
    • ARRAYBUFFER: To receive the HTTP response as an array buffer. The ArrayBuffer represents a generic, fixed-length raw binary data buffer. It is an array of bytes, often referred to as a byte array. You cannot directly manipulate the contents of an ArrayBuffer; instead, you create one of the typed array objects which represent the buffer in a specific format and use that to read and write the contents of the buffer.
  • Body: The name of the variable that contains the data that is to be sent to the server along with the HTTP request. The variable can be an input or local property. Use the drop-down list to select the property type. Note that not every HTTP method has a request body. The GET method should not have a request body, whereas other methods such as POST, PUT, PATCH, and DELETE may or may not have a request body.
  • Result Mapping: Reverse mapping of the response received from the server to the variable. The variable can be of type  input or local . Use the drop-down list to select the variable type. 
  • Headers: HTTP headers sets the HTTP headers of the request. It allows the client and the server to pass additional information with the request or the response. These headers accept pairs of names and their corresponding values as key-value pairs. If you want to map this field to a bh.input, or bh.local variable, click the Map button, select the property, and input the variable name.
  • params: Query string parameters whose values are appended to the URL. this field accepts name-value pairs. For example, if the URL is https://localhost:4200/user and the parameter is id=5, then the entire URL will be https://localhost:4200/user?id=5. If you want to map this field to a bh.input, or bh.local variable, click the Map button, select the property, and input the variable name.

Example

See UI Services Example.


Script Node                                                                                                                  Call Service Node  >