Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0

On the basis of the example provided, this page describes how use the URL adapter with the HTTP protocol.

Static GET Request

The following example shows how to access a web resource through the URL adapter.

The request operation uses the alias to identify the web resource and the method to perform. The response is a Blob. In this implementation, the response contents are mapped to a form to be displayed to the user.

In this example, the web resource is also part of the same example service (see API.HelloAPI). The URL of the resource is specified in the URL alias as follows:

Adapter AttributeValue
protocolhttp
port11112
pathhello/hello/GETHelloStatic
hostlocalhost
methodGET

Find below a list of all attributes that can be used with the HTTP protocol.

Full Dynamic GET

Sometimes URL parameters are not static but must be calculated or are know at runtime only. To reflect this, you can provide all information from the URL adapter alias dynamically on the request operation.

Tip

You can also use a mixture of static and dynamic access. Specify the static parts on the alias and provide the dynamic parts via the URL adapter parameters. This can be helpful because the settings of the alias can be changed in the service configuration later.

The following example shows a full dynamic request. All needed information to access the web resource is specified via the parameters.

Action composeURL builds the URL to access the dynamic resource of the API and the name given by the user is added.

Alias Attributes

Find below a list of relevant alias attributes, if the URL adapter is used with the HTTP protocol. Default values used when an option is not explicitly set are written in bold.

Multiexcerpt
MultiExcerptNamehttp_alias_attributes
AttributeDescriptionAllowed Values / Examples
Standard
protocol

Multiexcerpt include
MultiExcerptNameprotocol
PageWithExcerptURL

one of: http (default), https

port

Multiexcerpt include
MultiExcerptNameport
PageWithExcerptURL

a valid port number (default: 80)
path

Multiexcerpt include
MultiExcerptNamepath
PageWithExcerptURL


method

Multiexcerpt include
MultiExcerptNamemethod
PageWithExcerptURL

one of: get (default), post, put, delete, patch, head, options
Advanced
userUsername/password.
followRedirects

Multiexcerpt include
MultiExcerptNamefollowRedirects
PageWithExcerptURL

any positive integer or 0
options
Multiexcerpt include
MultiExcerptNameoptions
PageWithExcerptURL
valid cURL options, e.g. CURLOPT_TIMEOUT=20
Proxy
proxyURL

Multiexcerpt include
MultiExcerptNameproxyURL
PageWithExcerptURL


proxyUser

Multiexcerpt include
MultiExcerptNameproxyUser
PageWithExcerptURL


proxyType

Multiexcerpt include
MultiExcerptNameproxyType
PageWithExcerptURL

one of: HTTP, SOCKS5
SSL
sslCAInfo

Multiexcerpt include
MultiExcerptNamesslCAInfo
PageWithExcerptURL


sslCertificateFile

Multiexcerpt include
MultiExcerptNamesslCertificateFile
PageWithExcerptURL


sslPrivateKeyFile

Multiexcerpt include
MultiExcerptNamesslPrivateKeyFile
PageWithExcerptURL


sslPrivateKeyPassword

Multiexcerpt include
MultiExcerptNamesslPrivateKeyPassword
PageWithExcerptURL


sslCertificateType

Multiexcerpt include
MultiExcerptNamesslCertificateType
PageWithExcerptURL

one of: PEM (default), DER
sslVerifyHost

Multiexcerpt include
MultiExcerptNamesslVerifyHost
PageWithExcerptURL

OnVerification on.
OffVerification off (default).
ExistenceLimit verification to the mere existence of the host.
sslVerifyPeer

Multiexcerpt include
MultiExcerptNamesslVerifyPeer
PageWithExcerptURL

OnVerification on (default).
OffVerification off.
sslPrivateKeyType

Multiexcerpt include
MultiExcerptNamesslPrivateKeyType
PageWithExcerptURL

one of: PEM (default), DER

URL Adapter Response

The adapter returns the following parameters:

Multiexcerpt include
MultiExcerptNameurl_adapter_outgoing
PageWithExcerptURL

HTTP Headers

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameurl_adapter_http_headers
PageWithExcerptINTERNAL:_designer_excerpts

Panel
titleOn this Page:
Table of Contents
Panel
titleRelated Pages:

Otp
Floatingfalse
maxHLevel1

rp