This shows you the differences between two versions of the page.
api_webservice_adaptor [2023/12/18 14:33] 127.0.0.1 external edit |
api_webservice_adaptor [2024/12/10 15:37] (current) montse [Authentication Types] |
||
---|---|---|---|
Line 13: | Line 13: | ||
===== Setup Parameters of the REST Adaptor ===== | ===== Setup Parameters of the REST Adaptor ===== | ||
- | * ** EndPoint**: Base URL to access the service. | + | * ** EndPoint**: base URL to access the service. |
- | * **Keep_Session**: Indicates whether the session should be maintained between requests to the service. If it is checked, the adapter will add the cookies it receives in the responses to the requests it makes. | + | * **Keep_Session**: indicates whether the session should be maintained between requests to the service. If it is checked, the adapter will add the cookies it receives in the responses to the requests it makes. |
- | * **IsSecure**: Indicates if requests to the service were sent over the http or https protocol. | + | * **IsSecure**: indicates if requests to the service were sent over the http or https protocol. |
- | * **Service Charset(Opt.)**: For setting the charset you will use in a sHTTP service (e.g. REST). Words and sentences in text are created from characters. A character encoding provides a key to unlock (ie. crack) the code. Thus, the charset is the encoding information, which is to say the set of mappings between the bytes in the computer and the characters in the character set. Without the key, the data looks like garbage. An example of charset are UTF-8 or UTF-16. It uses Cp1047 by default. | + | * **Service Charset(Opt.)**: for setting the charset you will use in a sHTTP service (e.g. REST). Words and sentences in text are created from characters. A character encoding provides a key to unlock (ie. crack) the code. Thus, the charset is the encoding information, which is to say the set of mappings between the bytes in the computer and the characters in the character set. Without the key, the data looks like garbage. An example of charset are UTF-8 or UTF-16. It uses Cp1047 by default. |
- | * **WADL_File (Opt.)**: This is a machine-readable XML description of HTTP-based web services (e.g. REST). The aim of the WADL file is to model the resources provided by a service and the relationships between them. | + | * **WADL_File (Opt.)**: this is a machine-readable XML description of HTTP-based web services (e.g. REST). The aim of the WADL file is to model the resources provided by a service and the relationships between them. |
- | * **Headers**: Allows adding headers to all the requests that are sent to the service. | + | * **Headers**: allows adding headers to all the requests that are sent to the service. |
- | * **Authentication Type**: Allows selecting the type of authentication that the service requires. Once selected, it allows us to enter the necessary data for the type of authentication selected. No authentication type is used by default. | + | * **Authentication Type**: allows selecting the type of authentication that the service requires. Once selected, it allows us to enter the necessary data for the type of authentication selected. No authentication type is used by default. |
Line 25: | Line 25: | ||
* **deleteRest(resource, headers)** | * **deleteRest(resource, headers)** | ||
- | * Description: It allows the configuration of an HTTP request of type Delete. | + | * Description: it allows the configuration of an HTTP request of type Delete. |
- | * Resource: Indicates the resource within the EndPoint on which the request will be made. | + | * Resource: indicates the resource within the EndPoint on which the request will be made. |
- | * Headers: Indicates the headers that must be added to the request. | + | * Headers: indicates the headers that must be added to the request. |
- | * Charset: To choose what charset the user wants. | + | * Charset: to choose what charset the user wants. |
- | * Body: Indicates que content of the parameter. | + | * Body: indicates que content of the parameter. |
* **getALLJSONElementValueByTagname(ResponseName, JsonTagName)** | * **getALLJSONElementValueByTagname(ResponseName, JsonTagName)** | ||
- | * Description: If the content of the response to a request is JSON, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. The result is presented with the values separated by the character |, in the field Message / Result / Value. | + | * Description: if the content of the response to a request is JSON, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. The result is presented with the values separated by the character |, in the field Message / Result / Value. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
- | * JSonTagName: Tagname expression used to identify the element. | + | * JSonTagName: tagname expression used to identify the element. |
* **getALLXMLElementValueByTagName(StepResponse, ElementTag)** | * **getALLXMLElementValueByTagName(StepResponse, ElementTag)** | ||
- | * Description: If the content of the response to a request is XML, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. Instead of returning only one element (the first), this PF returns a list of all elements. | + | * Description: if the content of the response to a request is XML, this function allows to retrieve all the values of the element linked to the tagName as an array of values represented with a tastRowValues object. Instead of returning only one element (the first), this PF returns a list of all elements. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
* ElementTag: XML´s tag used to identify the element. | * ElementTag: XML´s tag used to identify the element. | ||
* **getCookieValue(StepResponse, Cookie)** | * **getCookieValue(StepResponse, Cookie)** | ||
- | * Description: Retrieve the value of the indicated cookie. | + | * Description: retrieve the value of the indicated cookie. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
- | * Cookie: Indicates Cookie´s name to retrieve. | + | * Cookie: indicates Cookie´s name to retrieve. |
- | * **getElementsCountByJsonPath(JsonPath, ResponseName)**: Returns the number of elements that have the same JsonPath. | + | * **getElementsCountByJsonPath(JsonPath, ResponseName)**: returns the number of elements that have the same JsonPath. |
- | * JsonPath: The JsonPath to search for. | + | * JsonPath: the JsonPath to search for. |
- | * ResponseName: The name under which the HTTP response was generated. | + | * ResponseName: the name under which the HTTP response was generated. |
| | ||
- | * **getElementsCountByTagName(tagName, ResponseName)**: Returns the number of elements that have the same tag name. | + | * **getElementsCountByTagName(tagName, ResponseName)**: returns the number of elements that have the same tag name. |
- | * tagName: The tag name to search for. | + | * tagName: the tag name to search for. |
- | * ResponseName: The name under which the HTTP response was generated. | + | * ResponseName: the name under which the HTTP response was generated. |
- | * **getElementsValueByJsonPath(JsonPath, ResponseName)**: Returns all elements that have the same JsonPath. | + | * **getElementsValueByJsonPath(JsonPath, ResponseName)**: returns all elements that have the same JsonPath. |
- | * JsonPath: The JsonPath to search. | + | * JsonPath: the JsonPath to search. |
- | * ResponseName: The name under which the HTTP response was generated. | + | * ResponseName: the name under which the HTTP response was generated. |
* **getHeaderValue(StepResponse, Header)** | * **getHeaderValue(StepResponse, Header)** | ||
- | * Description: It allows to obtain the value of a received header in an HTTP response. | + | * Description: it allows to obtain the value of a received header in an HTTP response. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
- | * Header: The name of the header from which you want to extract the value. | + | * Header: the name of the header from which you want to extract the value. |
* **getHTMLElementValueByXpath()**\\ | * **getHTMLElementValueByXpath()**\\ | ||
- | * Description: If the content of the response to a request is HTML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. | + | * Description: if the content of the response to a request is HTML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
* XPathExp: XPath expression used to identify the element. | * XPathExp: XPath expression used to identify the element. | ||
* **getJSONElementValueByJsonPath(StepResponse, JSonPathExp)** | * **getJSONElementValueByJsonPath(StepResponse, JSonPathExp)** | ||
- | * Description: If the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the JsonPath. If there are more than one element, returns the first. | + | * Description: if the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the JsonPath. If there are more than one element, returns the first. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
* JSonPathExp: JSonPath expression used to identify the element. | * JSonPathExp: JSonPath expression used to identify the element. | ||
* **getJSONElementValueByTagName(StepResponse, TagnameExp)** | * **getJSONElementValueByTagName(StepResponse, TagnameExp)** | ||
- | * Description: If the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the TagName. If there are more than one element, returns the first. The result is presented with the values separated by the character |, in the field Message / Result / Value. | + | * Description: if the content of the response to a request is JSON, this function allows to retrieve a value of an element used to identify the element the TagName. If there are more than one element, returns the first. The result is presented with the values separated by the character |, in the field Message / Result / Value. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
- | * JSonTagname: Tagname expression used to identify the element. | + | * JSonTagname: tagname expression used to identify the element. |
* **getResponseBody**: | * **getResponseBody**: | ||
* **getResponseStatus(StepResponse)** | * **getResponseStatus(StepResponse)** | ||
- | * Description: Allows to retrieve response´s Http status code. | + | * Description: allows to retrieve response´s Http status code. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
- | * **getResponseTime**: Returns the time taken in milliseconds to receive the response to a request. To identify the response it receives a parameter with the name of the HttpResponse variable from which we want to obtain the information. | + | * **getResponseTime**: returns the time taken in milliseconds to receive the response to a request. To identify the response it receives a parameter with the name of the HttpResponse variable from which we want to obtain the information. |
* **getRest(resource, headers, parameters)** | * **getRest(resource, headers, parameters)** | ||
- | * Description: It allows to configure an HTTP request of type Get. | + | * Description: it allows to configure an HTTP request of type Get. |
- | * Resource: Indicates the resource within the EndPoint on which the request will be made. | + | * Resource: indicates the resource within the EndPoint on which the request will be made. |
- | * Headers: Indicates the headers that must be added to the request. | + | * Headers: indicates the headers that must be added to the request. |
- | * Parameters: Indicates the parameters that must be added to the URL of the request. | + | * Parameters: indicates the parameters that must be added to the URL of the request. |
- | * Charset: To choose what charset the user wants. | + | * Charset: to choose what charset the user wants. |
* **getXMLElementValueByTagName(StepResponse, ElementTag)** | * **getXMLElementValueByTagName(StepResponse, ElementTag)** | ||
- | * Description: If the content of the response to a request is XML, this function allows to retrieve a value of an element using the tag to identify it. If there are more than one element, returns the first. | + | * Description: if the content of the response to a request is XML, this function allows to retrieve a value of an element using the tag to identify it. If there are more than one element, returns the first. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
* ElementTag: XML´s tag used to identify the element. | * ElementTag: XML´s tag used to identify the element. | ||
* **getXMLElementValueByXPath(StepResponse, XPathExp)** | * **getXMLElementValueByXPath(StepResponse, XPathExp)** | ||
- | * Description: If the content of the response to a request is XML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. Also, it allows to search values in responses with XHTML content type. | + | * Description: if the content of the response to a request is XML, this function allows to retrieve a value of an element, using to identify the element an XPath expression. Also, it allows to search values in responses with XHTML content type. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
* XPathExp: XPath expression used to identify the element. | * XPathExp: XPath expression used to identify the element. | ||
* **patchRest(resource, headers, content-type, body)** | * **patchRest(resource, headers, content-type, body)** | ||
- | * Description: It allows you to configure an HTTP request of type Patch. | + | * Description: it allows you to configure an HTTP request of type Patch. |
- | * Resource: Indicates the resource within the EndPoint on which the request will be made. | + | * Resource: indicates the resource within the EndPoint on which the request will be made. |
- | * Headers: Indicates the headers that must be added to the request. | + | * Headers: indicates the headers that must be added to the request. |
* Content-type: HTTP standard header that indicates the type of content that is added to the body of the request. | * Content-type: HTTP standard header that indicates the type of content that is added to the body of the request. | ||
- | * Body: Content of the Http request. | + | * Body: content of the Http request. |
* **postRest(resource, headers, content-type, body)** | * **postRest(resource, headers, content-type, body)** | ||
- | * Description: It allows you to configure an HTTP request of type Post. | + | * Description: it allows you to configure an HTTP request of type Post. |
- | * Resource: Indicates the resource within the EndPoint on which the request will be made. | + | * Resource: indicates the resource within the EndPoint on which the request will be made. |
- | * Headers: Indicates the headers that must be added to the request. | + | * Headers: indicates the headers that must be added to the request. |
* Content-type: HTTP standard header that indicates the type of content that is added to the body of the request. | * Content-type: HTTP standard header that indicates the type of content that is added to the body of the request. | ||
- | * Body: Content of the Http request. | + | * Body: content of the Http request. |
* **putRest(resource, headers, content-type, body)** | * **putRest(resource, headers, content-type, body)** | ||
- | * Description: Allows you to configure an HTTP request of type Put. | + | * Description: allows you to configure an HTTP request of type Put. |
- | * Resource: Indicates the resource within the EndPoint on which the request will be made. | + | * Resource: indicates the resource within the EndPoint on which the request will be made. |
- | * Headers: Indicates the headers that must be added to the request. | + | * Headers: indicates the headers that must be added to the request. |
* Content-type: HTTP standard header that indicates the type of content that is added to the body of the request. | * Content-type: HTTP standard header that indicates the type of content that is added to the body of the request. | ||
- | * Body: Content of the Http request. | + | * Body: content of the Http request. |
* **responseBodyContainsText(responseName, searchValue)** | * **responseBodyContainsText(responseName, searchValue)** | ||
- | * Description: Search in the body field of the response (stepResponse), if there is any match with the string of parameter searchValue. True return if affirmative. | + | * Description: search in the body field of the response (stepResponse), if there is any match with the string of parameter searchValue. True return if affirmative. |
- | * ResponseName: Indicate the name which the Http Response was generated. | + | * ResponseName: indicate the name which the Http Response was generated. |
- | * SearchValue: Text to search inside body of response. | + | * SearchValue: text to search inside body of response. |
* **setBasicAuthentication(user, password)** | * **setBasicAuthentication(user, password)** | ||
- | * Description: It allows to configure the authentication scheme of the requests that are sent to the EndPoint as BasicAuthentication. It overwrites the security setting done in the adapter setup. | + | * Description: it allows to configure the authentication scheme of the requests that are sent to the EndPoint as BasicAuthentication. It overwrites the security setting done in the adapter setup. |
- | * User: User code used as credential. | + | * User: user code used as credential. |
- | * Password: Password to present as credential. | + | * Password: password to present as credential. |
* **setBearerTokenAuthentication(token)** | * **setBearerTokenAuthentication(token)** | ||
- | * Description: It allows to configure the authentication scheme of the requests that are send to the endpoint as Bearer Token Authentication Scheme. It overwrites the security setting done in the adapter setup. | + | * Description: it allows to configure the authentication scheme of the requests that are send to the endpoint as Bearer Token Authentication Scheme. It overwrites the security setting done in the adapter setup. |
- | * Token: Token´s value that will be presented as credential. | + | * Token: token´s value that will be presented as credential. |
* **setDigestAuthentication(user, password, realm, nonce, algorithm, Qoq, NonceCount, ClientNonce, Opaque)** | * **setDigestAuthentication(user, password, realm, nonce, algorithm, Qoq, NonceCount, ClientNonce, Opaque)** | ||
- | * Description: It allows to configure the authentication scheme of the requests that are send to the endpoint as Digest Authentication Scheme. It overwrites the security setting done in the adapter setup. | + | * Description: it allows to configure the authentication scheme of the requests that are send to the endpoint as Digest Authentication Scheme. It overwrites the security setting done in the adapter setup. |
- | * User: Username used as credential. | + | * User: username used as credential. |
- | * Password: Password to present as credential. | + | * Password: password to present as credential. |
- | * Realm: Security domain on which security validation must be performed. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. | + | * Realm: security domain on which security validation must be performed. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. |
- | * Nonce: Nonce returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. | + | * Nonce: nonce returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. |
- | * Algorithm: Algorithm used for encryption. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. | + | * Algorithm: algorithm used for encryption. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. |
- | * Qoq: Quality of the protection code. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. | + | * Qoq: quality of the protection code. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. |
- | * NonceCount: NonceCount associated with the request. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. | + | * NonceCount: nonceCount associated with the request. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. |
- | * ClientNonce: Nonce generated by the client. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. | + | * ClientNonce: nonce generated by the client. It is optional, if it is not known, the adapter will try to perform the validation with the data obtained from the response to the challenge. |
- | * Opaque: Opaque returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtain | + | * Opaque: opaque returned by the server. It is optional, if it is not known, the adapter will try to perform the validation with the data obtain |
* **setNoneAuthentication()** | * **setNoneAuthentication()** | ||
- | * Description: It allows to configure the authentication method of the requests that are sent to the EndPoint as requests without authentication scheme. It overwrites the security setting done in the adapter setup.\\ | + | * Description: it allows to configure the authentication method of the requests that are sent to the EndPoint as requests without authentication scheme. It overwrites the security setting done in the adapter setup.\\ |
Line 179: | Line 179: | ||
Now comes the enumeration of the authentication types, make a brief description of them and think what parameters we might need. | Now comes the enumeration of the authentication types, make a brief description of them and think what parameters we might need. | ||
- | * ** No Authorization (None Auth): ** If the user selects this method, it is not necessary to authenticate to use the service. | + | * ** No Authorization (None Auth): ** if the user selects this method, it is not necessary to authenticate to use the service. |
- | * ** Basic Authorization (Basic Auth): ** The simplest method only requires the user and password parameters. https://en.wikipedia.org/wiki/Basic_access_authentication | + | * ** Basic Authorization (Basic Auth): ** the simplest method only requires the user and password parameters. https://en.wikipedia.org/wiki/Basic_access_authentication |
- | * ** Digest Authorization (Digest Auth): ** This method is a bit stronger because the key is encrypted and the user, in the postman tool when you select this type of authentication requests the following parameters:\\ \\ | + | * ** Digest Authorization (Digest Auth): ** this method is a bit stronger because the key is encrypted and the user, in the postman tool when you select this type of authentication requests the following parameters:\\ \\ |
* User | * User | ||
* Password\\ \\ And as optional (default values are used if the user does not provide them) the following:\\ \\ | * Password\\ \\ And as optional (default values are used if the user does not provide them) the following:\\ \\ | ||
- | * Realm: Security domain against which to authenticate. | + | * Realm: security domain against which to authenticate. |
- | * Algorithm: Encryption algorithm. MD5 or MD5-sess. | + | * Algorithm: encryption algorithm. MD5 or MD5-sess. |
- | * Nonce: Code that the server issues in the response when a request is not authorized. It is unique per session and must be included in the following requests. | + | * Nonce: code that the server issues in the response when a request is not authorized. It is unique per session and must be included in the following requests. |
- | * Qop: Quality of protection, the possible values are auth (more common) or auth-int (authorization with integrity) I think less supported and used. | + | * Qop: quality of protection, the possible values are auth (more common) or auth-int (authorization with integrity) I think less supported and used. |
- | * Nonce Count: Number of request made to the server with the same nonce, its obligation depends on the value assigned to Qop. | + | * Nonce Count: number of request made to the server with the same nonce, its obligation depends on the value assigned to Qop. |
- | * Opaque: It is a value returned by the server in the first unauthorized response, and must be added without modifying all subsequent requests to the server. https://en.wikipedia.org/wiki/Digest_access_authentication | + | * Opaque: it is a value returned by the server in the first unauthorized response, and must be added without modifying all subsequent requests to the server. https://en.wikipedia.org/wiki/Digest_access_authentication |
- | * ** OAuth 1.0:** This method, open Authorization, is more modern to create a first standard related to authentication. OAuth 2.0 is used more but we could find a service that uses it. In Postman the following parameters are requested:\\ \\ | + | * ** OAuth 1.0:** this method, open Authorization, is more modern to create a first standard related to authentication. OAuth 2.0 is used more but we could find a service that uses it. In Postman the following parameters are requested:\\ \\ |
- | * ConsumerKey: A value used by the consumer of the service to identify himself to it. | + | * ConsumerKey: a value used by the consumer of the service to identify himself to it. |
- | * ConsumerSecret: Token used by the consumer to validate their ownership of the ConsumerKey. | + | * ConsumerSecret: token used by the consumer to validate their ownership of the ConsumerKey. |
- | * Access Token: Access Token. | + | * Access Token: access Token. |
- | * Token Secret: Another key to ensure ownership of the access token.\\ And as optional parameters (default values if user does not enter):\\ | + | * Token Secret: another key to ensure ownership of the access token.\\ And as optional parameters (default values if user does not enter):\\ |
- | * Signature Method: The signature method used by the consumer to sign the requests. | + | * Signature Method: the signature method used by the consumer to sign the requests. |
- | * Timestamp: A timestamp is added to the request. | + | * Timestamp: a timestamp is added to the request. |
- | * Nonce: Random string generated by the client, will be added to all the requests. | + | * Nonce: random string generated by the client, will be added to all the requests. |
- | * Realm: Indicates the security domain that performs authentication. https://es.wikipedia.org/wiki/OAuth | + | * Realm: indicates the security domain that performs authentication. https://es.wikipedia.org/wiki/OAuth |
- | * ** OAuth 2.0:** The evolution of OAuth 1.0, is the standard most supported by large Internet companies, Google, Facebook, Twitter, etc., not being an expert, I believe it is two-step authentication. Postman only asks for the parameter: | + | * ** OAuth 2.0:** the evolution of OAuth 1.0, is the standard most supported by large Internet companies, Google, Facebook, Twitter, etc., not being an expert, I believe it is two-step authentication. Postman only asks for the parameter: |
* Access Token. Access code to the service. But in the option to request an Access Token request data to authenticate against the service that is going to give you the access code for that operation. In addition to these methods other authentication methods appear in Postman such as: | * Access Token. Access code to the service. But in the option to request an Access Token request data to authenticate against the service that is going to give you the access code for that operation. In addition to these methods other authentication methods appear in Postman such as: | ||
* Bearer Token. https://swagger.io/docs/specification/authentication/bearer-authentication/ | * Bearer Token. https://swagger.io/docs/specification/authentication/bearer-authentication/ | ||
Line 216: | Line 216: | ||
The existing methods are: | The existing methods are: | ||
- | * **GET:** It is used to read and retrieve the information of a resource on the server. It is probably the easiest to implement since all the most relevant data of the request appear in the URL of the request. | + | * **GET:** it is used to read and retrieve the information of a resource on the server. It is probably the easiest to implement since all the most relevant data of the request appear in the URL of the request. |
* httpResponse = get (UrlBase, Resource, List Headers, List Parameters) | * httpResponse = get (UrlBase, Resource, List Headers, List Parameters) | ||
* UrlBase = It would be obtained from the initialization of the adapter. | * UrlBase = It would be obtained from the initialization of the adapter. | ||
Line 228: | Line 228: | ||
* This is the simple screen in which the user includes headers and headers as a single String that will be parsed by the adapter to decompose it, another design could be made in which the user would be adding parameters or headers at will. | * This is the simple screen in which the user includes headers and headers as a single String that will be parsed by the adapter to decompose it, another design could be made in which the user would be adding parameters or headers at will. | ||
- | * **POST:** It is used to create a resource on the server, with the information contained in a form, or in a Json, XML or other file. That is, the way in which the data is transmitted in the body of the request may vary, and it is necessary to allow the user to indicate it in some way in order to build the request. It is the header content_type. | + | * **POST:** it is used to create a resource on the server, with the information contained in a form, or in a Json, XML or other file. That is, the way in which the data is transmitted in the body of the request may vary, and it is necessary to allow the user to indicate it in some way in order to build the request. It is the header content_type. |
* httpResponse = post (UrlBase, Resource, List Headers, Content Type, Data) | * httpResponse = post (UrlBase, Resource, List Headers, Content Type, Data) | ||
* In this case, the data could be represented in a Json or XML file that the user should either be able to upload to the application or cut and paste it in some editor, as in the case of the Queries or the Javascript code. | * In this case, the data could be represented in a Json or XML file that the user should either be able to upload to the application or cut and paste it in some editor, as in the case of the Queries or the Javascript code. | ||
Line 236: | Line 236: | ||
- | * **PUT:** It is used to update the information related to a resource on the server. Similar to post in requirements. | + | * **PUT:** it is used to update the information related to a resource on the server. Similar to post in requirements. |
* httpResponse = put ("UrlBase, Resource, List Headers, Content Type, Data) | * httpResponse = put ("UrlBase, Resource, List Headers, Content Type, Data) | ||
- | * **DELETE:** It is used to delete a resource on the server. | + | * **DELETE:** it is used to delete a resource on the server. |
* httpResponse = delete ("UrlBase, Bank, User, Account, balance") | * httpResponse = delete ("UrlBase, Bank, User, Account, balance") | ||
| | ||
- | * **HEAD:** Similar to GET, but the response does not contain the body, the data, only contains the header. | + | * **HEAD:** similar to GET, but the response does not contain the body, the data, only contains the header. |