Enhanced HTTP client for z/TPF
Hypertext Transfer Protocol (HTTP) is a request or response-based protocol that you can use to interact with servers. The enhanced HTTP client for z/TPF provides support for z/TPF applications to send HTTP version 1.1 client requests. The enhanced HTTP client replaces the HTTP client support.
With the enhanced HTTP client, you can send HTTP version 1.1 client requests by using one of the
following HTTP client methods:
- GET
- PUT
- POST
- DELETE
- HEAD
The enhanced HTTP client provides the following application functions for a z/TPF application to send HTTP client requests:
- tpf_httpSendRequest
- You can use this function to send a synchronous HTTP client request. When a synchronous request is sent, the ECB that sent the request is suspended until the response is received.
- tpf_httpSendAsyncRequest
- You can use this function to send an asynchronous HTTP client request. When an asynchronous request is sent, the ECB that sent the request can exit and a new ECB is created when the response is received.
The enhanced HTTP client supports the following session types:
- Persistent HTTP client sessions
- Persistent HTTP client sessions are pre-established by the z/TPF high-speed connector and are kept open for any HTTP client request from any application process.
- Non-persistent HTTP client sessions
- Non-persistent HTTP client sessions are established when the application request is sent and closed when the response is returned to the application.
You can use the tpf_httpSendRequest and tpf_httpSendAsyncRequest functions to send requests on persistent HTTP client sessions or non-persistent HTTP client sessions.