object
http_core
Transport-independent normalized HTTP request and response constructors, validators, wire parsers and generators, and body codec dispatch.
logtalk_load(http_core(loader))static, context_switching_callsPublic predicates
request/7
Constructs a validated normalized request/6 term from the given method, target, version, headers, body, and properties.
staticrequest(Method,Target,Version,Headers,Body,Properties,Request)request(+atom,+compound,+compound,+list(compound),+compound,+list(compound),-compound) - one_or_errorMethod is not a valid HTTP method atom:domain_error(http_method,Method)Target is not a valid normalized HTTP target term:domain_error(http_target,Target)Version is not a valid HTTP version term:domain_error(http_version,Version)Headers is not a valid normalized HTTP header list:domain_error(http_headers,Headers)Body is not a valid normalized HTTP body term:domain_error(http_body,Body)Properties is not a valid normalized HTTP property list:domain_error(http_properties,Properties)domain_error(http_header_semantics,Header)domain_error(http_property_semantics,Property)response/6
Constructs a validated normalized response/5 term from the given version, status, headers, body, and properties.
staticresponse(Version,Status,Headers,Body,Properties,Response)response(+compound,+compound,+list(compound),+compound,+list(compound),-compound) - one_or_errorVersion is not a valid HTTP version term:domain_error(http_version,Version)Status is not a valid normalized HTTP status term:domain_error(http_status,Status)Headers is not a valid normalized HTTP header list:domain_error(http_headers,Headers)Body is not a valid normalized HTTP body term:domain_error(http_body,Body)Properties is not a valid normalized HTTP property list:domain_error(http_properties,Properties)domain_error(http_header_semantics,Header)domain_error(http_property_semantics,Property)is_request/1
Succeeds if the given term is a structurally and semantically valid normalized request/6 term.
staticis_request(Request)is_request(+term) - zero_or_oneis_response/1
Succeeds if the given term is a structurally and semantically valid normalized response/5 term.
staticis_response(Response)is_response(+term) - zero_or_oneparse_request/2
Parses a complete HTTP request message from the given source (bytes(List), codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) into a normalized request/6 term.
staticparse_request(Source,Request)parse_request(++compound,--compound) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)domain_error(http_method,Method)domain_error(http_target,Target)domain_error(http_version,Version)domain_error(http_headers,Headers)domain_error(http_body,Body)domain_error(http_properties,Properties)domain_error(http_header_semantics,Header)domain_error(http_property_semantics,Property)generate_request/2
Generates a complete HTTP request message to the given sink (bytes(List), codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) from a normalized request/6 term.
staticgenerate_request(Sink,Request)generate_request(+compound,++compound) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)Request is not a valid normalized HTTP request term:domain_error(http_request,Request)parse_response/2
Parses a complete HTTP response message from the given source (bytes(List), codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) into a normalized response/5 term.
staticparse_response(Source,Response)parse_response(++compound,--compound) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)domain_error(http_version,Version)domain_error(http_status,Status)domain_error(http_headers,Headers)domain_error(http_body,Body)domain_error(http_properties,Properties)domain_error(http_header_semantics,Header)domain_error(http_property_semantics,Property)generate_response/2
Generates a complete HTTP response message to the given sink (bytes(List), codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) from a normalized response/5 term.
staticgenerate_response(Sink,Response)generate_response(+compound,++compound) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)Response is not a valid normalized HTTP response term:domain_error(http_response,Response)generate_response_headers/2
Generates an HTTP response status line and effective header block, terminated by an empty line, to the given sink from a normalized response/5 term.
staticgenerate_response_headers(Sink,Response)generate_response_headers(+compound,++compound) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)Response is not a valid normalized HTTP response term:domain_error(http_response,Response)parse_request_line/2
Parses an HTTP request line from the given source (codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) into a request_line(Method, Target, Version) term.
staticparse_request_line(Source,RequestLine)parse_request_line(++compound,--compound) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)generate_request_line/2
Generates an HTTP request line to the given sink (codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) from a request_line(Method, Target, Version) term.
staticgenerate_request_line(Sink,RequestLine)generate_request_line(+compound,++compound) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)parse_status_line/2
Parses an HTTP status line from the given source (codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) into a status_line(Version, Status) term.
staticparse_status_line(Source,StatusLine)parse_status_line(++compound,--compound) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)generate_status_line/2
Generates an HTTP status line to the given sink (codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) from a status_line(Version, Status) term.
staticgenerate_status_line(Sink,StatusLine)generate_status_line(+compound,++compound) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)parse_headers/2
Parses an HTTP header block from the given source (codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) into normalized header Name-Value pairs with typed values for recognized headers.
staticparse_headers(Source,Headers)parse_headers(++compound,-list(compound)) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)generate_headers/2
Generates an HTTP header block to the given sink (codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) from normalized header Name-Value pairs.
staticgenerate_headers(Sink,Headers)generate_headers(+compound,++list(compound)) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)Headers is not a valid normalized HTTP header list:domain_error(http_headers,Headers)parse_body/4
Parses a body payload from the given source (bytes(List), codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) according to the given media type and options into a normalized body term.
staticparse_body(Source,MediaType,Options,Body)parse_body(++compound,++atom,+list(compound),--compound) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)MediaType is not a valid HTTP media type atom:domain_error(http_media_type,MediaType)Options is not a valid HTTP body options list:domain_error(http_body_options,Options)MediaType when codec-based decoding is required:existence_error(http_body_codec,MediaType)generate_body/3
Generates a body payload to the given sink (bytes(List), codes(List), chars(List), atom(Atom), file(Path), or stream(Stream)) from a normalized body term and options.
staticgenerate_body(Sink,Body,Options)generate_body(+compound,++compound,+list(compound)) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)Body is not a valid normalized HTTP body term:domain_error(http_body,Body)Options is not a valid HTTP body options list:domain_error(http_body_options,Options)existence_error(http_body_codec,MediaType)request_body_bytes/4
Generates the transfer-decoded entity-body bytes for a normalized HTTP request body using the request headers and properties to select body serialization options.
staticrequest_body_bytes(Headers,Body,Properties,Bytes)request_body_bytes(+list(compound),++compound,+list(compound),--list(byte)) - one_or_errorHeaders is not a valid normalized HTTP header list:domain_error(http_headers,Headers)Body is not a valid normalized HTTP body term:domain_error(http_body,Body)Properties is not a valid normalized HTTP property list:domain_error(http_properties,Properties)response_body_bytes/4
Generates the transfer-decoded entity-body bytes for a normalized HTTP response body using the response headers and properties to select body serialization options.
staticresponse_body_bytes(Headers,Body,Properties,Bytes)response_body_bytes(+list(compound),++compound,+list(compound),--list(byte)) - one_or_errorHeaders is not a valid normalized HTTP header list:domain_error(http_headers,Headers)Body is not a valid normalized HTTP body term:domain_error(http_body,Body)Properties is not a valid normalized HTTP property list:domain_error(http_properties,Properties)encode_body/4
Encodes a semantic payload term using the registered concrete body codec for the given media type into a normalized body term.
staticencode_body(MediaType,Payload,Options,Body)encode_body(+atom,++term,+list(compound),-compound) - one_or_errorMediaType is not a valid HTTP media type atom:domain_error(http_media_type,MediaType)Options is not a valid HTTP body options list:domain_error(http_body_options,Options)MediaType:existence_error(http_body_codec,MediaType)decode_body/4
Decodes a normalized body term using the registered concrete body codec for the given media type into a semantic payload term.
staticdecode_body(MediaType,Body,Options,Payload)decode_body(+atom,++compound,+list(compound),--term) - one_or_errorMediaType is not a valid HTTP media type atom:domain_error(http_media_type,MediaType)Options is not a valid HTTP body options list:domain_error(http_body_options,Options)MediaType:existence_error(http_body_codec,MediaType)method/2
Returns the request method from a normalized request/6 term.
staticmethod(Request,Method)method(+compound,-atom) - one_or_errortarget/2
Returns the request target from a normalized request/6 term.
statictarget(Request,Target)target(+compound,-compound) - one_or_errorversion/2
Returns the HTTP version from a normalized request or response term.
staticversion(Message,Version)version(+compound,-compound) - one_or_errorstatus/2
Returns the response status from a normalized response/5 term.
staticstatus(Response,Status)status(+compound,-compound) - one_or_errorheaders/2
Returns the normalized header list from a request or response term.
staticheaders(Message,Headers)headers(+compound,-list(compound)) - one_or_errorheader/3
Enumerates normalized header Name and Value pairs from a request or response term.
staticheader(Message,Name,Value)header(+compound,?atom,?term) - zero_or_morebody/2
Returns the normalized body term from a request or response term.
staticbody(Message,Body)body(+compound,-compound) - one_or_errorproperty/2
Enumerates normalized derived or higher-layer properties from a request or response term.
staticproperty(Message,Property)property(+compound,?compound) - zero_or_moreProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)