Class ZCL_IBMC_SERVICE_ARCH

public create public

Documentation

IBM Watson SDK Platform-specifics

Interfaces

zif_ibmc_service_arch

Types

Visibility and LevelNameDocumentation
publicto_form_part type ref to if_web_http_request 
publicto_http_client type ref to if_web_http_clientHTTP Client Control Block
publicto_rest_request type ref to if_web_http_request 
publicto_rest_response type ref to if_web_http_response 
publicts_access_token type zif_ibmc_service_arch~ts_access_token 
publicts_client (structured type) 
publicts_header type zif_ibmc_service_arch~ts_header 
publicts_http_stat (structured type) 
publicts_http_status (structured type) 
publicts_request_prop type zif_ibmc_service_arch~ts_request_prop 
publicts_url type zif_ibmc_service_arch~ts_url 
publictt_header type zif_ibmc_service_arch~tt_header 

Methods

Visibility and LevelNameDocumentation
public static
base64_decode
importingi_base64type string
returningvalue(e_binary)type xstring
raisingzcx_ibmc_service_exception

Decodes base64 encoded data to binary.

Parameters
i_base64 Base64-encoded binary
e_binary Binary data
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public static
convert_string_to_utf8
importingi_stringtype string
returningvalue(e_utf8)type xstring
raisingzcx_ibmc_service_exception

Converts STRING data to UTF8 encoded XSTRING.

Parameters
i_string STRING data
e_utf8 UTF8-encoded data
public static
create_client_by_url
importingi_urltype string
i_request_proptype ts_request_prop
exportinge_clienttype ts_client
raisingzcx_ibmc_service_exception

Returns a HTTP/REST client based on an URL.

Parameters
i_url URL
i_request_prop Request parameters
e_client HTTP/REST client
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public static
execute
importingi_clienttype ts_client
i_methodtype zif_ibmc_service_arch~char
returningvalue(e_response)type to_rest_response
raisingzcx_ibmc_service_exception

Executes a HTTP request.

Parameters
i_client HTTP/REST client
i_method HTTP method (GET,POST,PUT,DELETE)
e_response Response of the request
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public static
get_default_proxy
importingi_urltype ts_url optional
exportinge_proxy_hosttype string
e_proxy_porttype string

Returns the default proxy host and port.

Parameters
i_url target URL
e_proxy_host Proxy host
e_proxy_port Proxy port
public static
get_http_status
importingi_rest_responsetype ref to if_web_http_response
returningvalue(e_status)type ts_http_status

Returns the status of a REST response.

Parameters
i_rest_response HTTP/REST response
e_status HTTP status
public static
get_progname
returningvalue(e_progname)type string

Returns an ABAP module identifier.

Parameters
e_progname ABAP module identifier
public static
get_response_binary
importingi_responsetype ref to if_web_http_response
returningvalue(e_data)type xstring

Reads binary data from a HTTP response.

Parameters
i_response HTTP response
e_data Binary data
public static
get_response_header
importingi_responsetype to_rest_response
i_header_fieldtype string
returningvalue(e_value)type string

Returns a HTTP response header.

Parameters
i_response HTTP/REST response
i_header_field Header field name
e_value Header field value
public static
get_response_string
importingi_responsetype ref to if_web_http_response
returningvalue(e_data)type string

Reads character data from a HTTP response.

Parameters
i_response HTTP response
e_data Character data
public static
get_timezone
returningvalue(e_timezone)type zif_ibmc_service_arch~ty_timezone

Returns the user's time zone.

Parameters
e_timezone user's time zone
public static
set_authentication_basic
importingi_clienttype ts_client
i_usernametype string
i_passwordtype string

Sets request header for basic authentication.

Parameters
i_client HTTP/REST client
i_username User name
i_password Password
public static
set_request_body_cdata
importingi_clienttype ts_client
i_datatype string

Set character data for the body of a HTTP request.

Parameters
i_client HTTP/REST client
i_data Character data
public static
set_request_body_xdata
importingi_clienttype ts_client
i_datatype xstring

Set binary data for the body of a HTTP request.

Parameters
i_client HTTP/REST client
i_data Binary data
public static
set_request_header
importingi_clienttype ts_client
i_nametype string
i_valuetype string

Sets a HTTP header.

Parameters
i_client HTTP/REST client
i_name Header field name
i_value Header field value
public static
set_request_uri
importingi_clienttype ts_client
i_uritype string

Sets the URI for a HTTP request.

Parameters
i_client HTTP/REST client
i_uri URI
public instance
add_form_part
importingi_clienttype ts_client
it_form_parttype zif_ibmc_service_arch~tt_form_part
raisingzcx_ibmc_service_exception

Generates a multi-part request body.

Parameters
i_client HTTP/REST client
it_form_part Table of form parts
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.