# rawCall

## Description

Directly access or call any REST API Web Service.

## Input / Parameters

| No | Name      | Description                                                               | Data Type | Required |
| -- | --------- | ------------------------------------------------------------------------- | --------- | -------- |
| 1  | connector | Name of connector and created in the Services and Global Components page. | String    | Yes      |
| 2  | path      | The function from the Web Service to be executed.                         | String    | Yes      |
| 3  | method    | The REST method to be used.                                               | String    | Yes      |
| 4  | options   | Object                                                                    | Object    | Yes      |
| 5  | header    |                                                                           |           | No       |
| 6  | data      | This contains the parameter in the function being called.                 | Object    | No       |
| 7  | file      | This contains the file parameters in the function being called.           | Object    | No       |
| 8  | extra     |                                                                           |           | No       |

## Output

## Callback

## Video

## Example

The user wants to call the RAW(REST) Web Service.

### Step

1. To create RAW(REST) Connector in Services and define the Name and url.\
   Name: rest\
   url: <http://203.116.137.100:51059/Training/Main.asmx> ( Please refer to the picture below, there is a example of main web service.We have take one of the operation which is getCustomer as an example to apply for this function.)<br>

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-66263daedcc9fa3c252a278ea4c5f77be626b872%2FrawCall-step-1.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-35220d96ca2a0f894425a29f987b73820a5e6e32%2FrawCall-step-2.png?alt=media)
2. Call the function "rawCall" and define the connector, path, method, set the function "toObject"to options.\
   connector: rest\
   path: getCustomer\
   method: post\
   options: toObject<br>

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-b4d66cad5bdd4d18cd44ee57cb9e317129e87686%2FrawCall-step-3.png?alt=media)
3. Define toObject.\
   result: raw

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-daecc1f11696729522a98359a3dff2a3a23fa402%2FrawCall-step-4.png?alt=media)
4. Add a console after callback function for display the response from console.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-4609d262e8633ec3128daaffaaa93a4752748b44%2FrawCall-step-5.png?alt=media)

### Result

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-815053e26466c1cab7154fd01d0e55aed0bc421a%2FrawCall-result-1.png?alt=media)

## Notes

* N/A
