object
http_multipart
Multipart helper predicates built on top of the normalized body and part terms provided by the http library.
logtalk_load(http_multipart(loader))static, context_switching_callsPublic predicates
body/3
Constructs a validated normalized multipart body term from a multipart media type atom and a list of multipart parts.
staticbody(MediaType,Parts,Body)body(+atom,+list(compound),-compound) - one_or_errorMediaType is not a valid multipart media type atom:domain_error(http_multipart_media_type,MediaType)Parts is not a valid list of normalized multipart parts:domain_error(http_multipart_parts,Parts)is_body/1
True when the argument is a valid normalized multipart body term.
staticis_body(Body)is_body(@term) - zero_or_oneparse/4
Parses a multipart body from a source term by delegating to the underlying http_core::parse_body/4 predicate after validating the media type.
staticparse(Source,MediaType,Options,Body)parse(++compound,+atom,+list,-compound) - one_or_errorMediaType is not a valid multipart media type atom:domain_error(http_multipart_media_type,MediaType)Source is a variable:instantiation_errorSource is neither a variable nor a valid HTTP source term:domain_error(http_source,Source)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)domain_error(http_multipart_body,Body)generate/3
Generates a multipart body to a sink term by delegating to the underlying http_core::generate_body/3 predicate after validating the multipart body term.
staticgenerate(Sink,Body,Options)generate(++compound,+compound,+list) - one_or_errorBody is not a valid normalized multipart body term:domain_error(http_multipart_body,Body)Sink is a variable:instantiation_errorSink is neither a variable nor a valid HTTP sink term:domain_error(http_sink,Sink)Options is not a valid HTTP body options list:domain_error(http_body_options,Options)existence_error(http_body_codec,MediaType)media_type/2
Returns the media type atom of a validated multipart body term.
staticmedia_type(Body,MediaType)media_type(+compound,-atom) - one_or_errorBody is not a valid normalized multipart body term:domain_error(http_multipart_body,Body)parts/2
Returns the list of multipart part terms of a validated multipart body term.
staticparts(Body,Parts)parts(+compound,-list(compound)) - one_or_errorBody is not a valid normalized multipart body term:domain_error(http_multipart_body,Body)fields/2
Returns the list of form-data field(Name, Value, Parameters) descriptors found in a validated multipart/form-data body, preserving part order.
staticfields(Body,Fields)fields(+compound,-list(compound)) - one_or_errorBody is not a valid normalized multipart/form-data body term:domain_error(http_multipart_form_data_body,Body)files/2
Returns the list of form-data file(Name, Filename, MediaType, Payload, Parameters) descriptors found in a validated multipart/form-data body, preserving part order.
staticfiles(Body,Files)files(+compound,-list(compound)) - one_or_errorBody is not a valid normalized multipart/form-data body term:domain_error(http_multipart_form_data_body,Body)part/4
Constructs a validated normalized multipart part term from headers, body, and properties.
staticpart(Headers,Body,Properties,Part)part(+list(compound),+compound,+list(compound),-compound) - one_or_errordomain_error(http_multipart_part,Part)is_part/1
True when the argument is a valid normalized multipart part term.
staticis_part(Part)is_part(@term) - zero_or_onepart_headers/2
Returns the headers of a validated multipart part term.
staticpart_headers(Part,Headers)part_headers(+compound,-list(compound)) - one_or_errorPart is not a valid normalized multipart part term:domain_error(http_multipart_part,Part)part_body/2
Returns the body of a validated multipart part term.
staticpart_body(Part,Body)part_body(+compound,-compound) - one_or_errorPart is not a valid normalized multipart part term:domain_error(http_multipart_part,Part)part_properties/2
Returns the properties of a validated multipart part term.
staticpart_properties(Part,Properties)part_properties(+compound,-list(compound)) - one_or_errorPart is not a valid normalized multipart part term:domain_error(http_multipart_part,Part)field/4
True when the validated multipart part is a textual form-data field part, returning its field name, text value, and additional disposition parameters.
staticfield(Part,Name,Value,Parameters)field(+compound,-atom,-term,-list(compound)) - zero_or_onefile/6
True when the validated multipart part is a form-data file part, returning its field name, filename, media type, payload term, and additional disposition parameters.
staticfile(Part,Name,Filename,MediaType,Payload,Parameters)file(+compound,-atom,-atom,-atom,-compound,-list(compound)) - zero_or_onefield_part/4
Constructs a normalized multipart part for a textual form-data field using a content-disposition header, a text/plain body, and additional disposition parameters.
staticfield_part(Name,Value,Parameters,Part)field_part(+atom,+term,+list(compound),-compound) - one_or_errorName is not a valid form-data field name:domain_error(http_multipart_form_data_parameter_name,Name)Parameters is not a valid list of additional form-data disposition parameters:domain_error(http_multipart_form_data_parameters,Parameters)domain_error(http_multipart_form_data_parameter,Parameter)file_part/6
Constructs a normalized multipart part for a form-data file using a content-disposition header, the given media type and payload, and additional disposition parameters.
staticfile_part(Name,Filename,MediaType,Payload,Parameters,Part)file_part(+atom,+atom,+atom,+compound,+list(compound),-compound) - one_or_errorName is not a valid form-data field name:domain_error(http_multipart_form_data_parameter_name,Name)Filename is not a valid form-data filename value:domain_error(http_multipart_form_data_parameter_value,Filename)Parameters is not a valid list of additional form-data disposition parameters:domain_error(http_multipart_form_data_parameters,Parameters)domain_error(http_multipart_form_data_parameter,Parameter)form_data_body/2
Constructs a multipart/form-data body from an ordered list of field(Name, Value, Parameters) and file(Name, Filename, MediaType, Payload, Parameters) descriptors.
staticform_data_body(Items,Body)form_data_body(+list(compound),-compound) - one_or_errorItems is not a valid list of form-data field or file descriptors:domain_error(http_multipart_form_data_items,Items)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)