object
http_client
Request-oriented HTTP client facade built on top of the URL and HTTP transport libraries.
logtalk_load(http_client(loader))static, context_switching_callsPublic predicates
request/4
Builds a normalized request from the given method, absolute URL, and options, selects a compatible transport, performs a one-shot exchange, and returns the response.
staticrequest(Method,URL,Response,Options)request(+atom,+atom,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Options contains invalid form-data headers:domain_error(http_client_form_data_headers,Headers)Options contains invalid form-data properties:domain_error(http_client_form_data_properties,Properties)domain_error(http_request,Request)domain_error(http_response_stream,Error)request/5
Builds a normalized request from the given method, absolute URL, and options, validates it against an open compatible connection or pool handle endpoint, selects a compatible transport, performs one exchange, and returns the response.
staticrequest(ConnectionOrPool,Method,URL,Response,Options)request(+compound,+atom,+atom,--compound,+list) - one_or_errorConnectionOrPool is a variable:instantiation_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Options contains invalid form-data headers:domain_error(http_client_form_data_headers,Headers)Options contains invalid form-data properties:domain_error(http_client_form_data_properties,Properties)domain_error(http_request,Request)domain_error(http_response_stream,Error)get/3
Convenience wrapper over request/4 using the get method.
staticget(URL,Response,Options)get(+atom,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)domain_error(http_response_stream,Error)get/4
Convenience wrapper over request/5 using the get method.
staticget(ConnectionOrPool,URL,Response,Options)get(+compound,+atom,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)domain_error(http_response_stream,Error)head/3
Convenience wrapper over request/4 using the head method.
statichead(URL,Response,Options)head(+atom,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)domain_error(http_response_stream,Error)head/4
Convenience wrapper over request/5 using the head method.
statichead(ConnectionOrPool,URL,Response,Options)head(+compound,+atom,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)domain_error(http_response_stream,Error)delete/3
Convenience wrapper over request/4 using the delete method.
staticdelete(URL,Response,Options)delete(+atom,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)domain_error(http_response_stream,Error)delete/4
Convenience wrapper over request/5 using the delete method.
staticdelete(ConnectionOrPool,URL,Response,Options)delete(+compound,+atom,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)domain_error(http_response_stream,Error)post/4
Convenience wrapper over request/4 using the post method and the given request body.
staticpost(URL,Body,Response,Options)post(+atom,+compound,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)post/5
Convenience wrapper over request/5 using the post method and the given request body.
staticpost(ConnectionOrPool,URL,Body,Response,Options)post(+compound,+atom,+compound,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)put/4
Convenience wrapper over request/4 using the put method and the given request body.
staticput(URL,Body,Response,Options)put(+atom,+compound,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)put/5
Convenience wrapper over request/5 using the put method and the given request body.
staticput(ConnectionOrPool,URL,Body,Response,Options)put(+compound,+atom,+compound,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)patch/4
Convenience wrapper over request/4 using the patch method and the given request body.
staticpatch(URL,Body,Response,Options)patch(+atom,+compound,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)patch/5
Convenience wrapper over request/5 using the patch method and the given request body.
staticpatch(ConnectionOrPool,URL,Body,Response,Options)patch(+compound,+atom,+compound,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)query/4
Convenience wrapper over request/4 using the query method and the given request body.
staticquery(URL,Body,Response,Options)query(+atom,+compound,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)query/5
Convenience wrapper over request/5 using the query method and the given request body.
staticquery(ConnectionOrPool,URL,Body,Response,Options)query(+compound,+atom,+compound,--compound,+list) - one_or_errorConnectionOrPool is not a valid reusable connection or pool handle:domain_error(http_socket_transport_connection_or_pool,ConnectionOrPool)ConnectionOrPool is not connected to the requested endpoint:domain_error(http_client_connection_target,endpoint(EndpointHost,EndpointPort,Host,Port))URL is a variable:instantiation_errorURL is not a supported absolute HTTP URL:domain_error(http_client_url,URL)URL uses an unsupported HTTP scheme:domain_error(http_client_scheme,Scheme)Options contains an invalid HTTP client request option:domain_error(http_client_request_option,Option)Body is invalid for the generated normalized HTTP request:domain_error(http_body,Body)domain_error(http_response_stream,Error)open_websocket/4
Builds a WebSocket opening-handshake request from the given absolute WebSocket URL and options, selects a compatible transport, opens a reusable socket connection, validates the server 101 response, and returns both the connection handle and the response.
staticopen_websocket(URL,Connection,Response,Options)open_websocket(+atom,--compound,--compound,+list) - one_or_errorURL is a variable:instantiation_errorURL is not a supported absolute WebSocket URL:domain_error(http_client_websocket_url,URL)URL uses an unsupported WebSocket scheme:domain_error(http_client_websocket_scheme,Scheme)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Options contains an invalid WebSocket client option:domain_error(http_client_websocket_option,Option)Options contains an invalid WebSocket HTTP version:domain_error(http_client_websocket_version,Version)Options contains reserved WebSocket headers:domain_error(http_client_websocket_headers,Headers)domain_error(http_client_websocket_version_rejection,Response)domain_error(http_client_websocket_authentication_rejection,Response)domain_error(http_client_websocket_redirection_rejection,Response)domain_error(http_client_websocket_rejection,Response)domain_error(http_client_websocket_response,Response)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)