Module Restful.Url.Q

module Q: sig .. end

Module of functions to manipulate the service's QUERY_STRING. These functions all assume the traditional interpretation of the QUERY_STRING, i.e. &-separated key-value pairs (each divided by =), where the order of the parameters is not meaningful.


val zap : Restful.Url.t -> Restful.Url.t

zap url: remove the entire QUERY_STRING from the url. E.g. http://google.com/search?q=foo becomes http://google.com/search.

val replace : string -> string -> Restful.Url.t -> Restful.Url.t

replace name value url: replace the QUERY_STRING parameter named name with value. E.g. replace "q" "bar" applied to http://google.com/search?q=foo yields http://google.com/search?q=bar.

val add : string -> string -> Restful.Url.t -> Restful.Url.t

add name value url: add a new parameter named name with value value to the QUERY_STRING. E.g. add "crazy" "bar" applied to http://google.com/search?q=foo yields http://google.com/search?crazy=bar&q=bar.

val delete : string -> Restful.Url.t -> Restful.Url.t

delete name url: delete the parameter named name from the QUERY_STRING. E.g. delete "q" applied to http://google.com/search?q=foo&crazy=bar yields http://google.com/search?crazy=bar.