package rdf

  1. Overview
  2. Docs

The signature of the resulting module when buildting the binding.

type result
val get : ?graph:Graph.graph -> base:Iri.t -> ?accept:string -> Uri.t -> Sparql_protocol.in_message -> result

get uri msg sends the Sparql query corresponding to the given Sparql_protocol.in_message with the GET method. uri is the complete uri of the service to connect to, i.e. not only the protocol, host and port, but also the path of the service, for example

  • parameter graph

    and base parameters are the same as in Sparql.execute.

  • parameter accept

    can be used to specify the Accept: header. Beware that the implementation handles only some content-types. This parameter can be used to require a response in, for example, the "application/rdf+xml" format.

val post : ?graph:Graph.graph -> base:Iri.t -> ?accept:string -> Uri.t -> ?query_var:string -> Sparql_protocol.in_message -> result

Same as get but using the POST method. To be used when sending large queries.

  • parameter query_var

    allows to change the message query name send ("query" by default)