package ez_api
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Easy API library and tools
Install
dune-project
Dependency
Authors
Maintainers
Sources
3.0.0.tar.gz
md5=9069f59ac83c958cedc90a25f24faa1e
sha512=4b066a759043e6704a9617bdc412d29f7ded058cb0e01eb3a8207f54b80bebb478bb98a96832e61b15d281bc8f132e1386459c563eb807a51c01324541fe28b2
doc/src/ez_api.request_common/ezRequest_common.ml.html
Source file ezRequest_common.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39open EzAPI let add_user_agent ?headers () = match !Req.user_agent_header, headers with | None, _ -> headers | Some h, None -> Some [ h ] | Some h, Some l -> if List.exists (fun (k, _) -> String.lowercase_ascii k = "user-agent") l then Some l else Some (h :: l) let handle_input: type i. ?params:(Param.t * param_value) list -> ?post:bool -> ?url_encode:bool -> input:i -> EzAPI.base_url -> ('arg, i, 'output, 'error, 'security) service -> 'arg -> ((url -> _) * (?content_type:string -> ?content:string -> url -> _)) -> _ = fun ?(params=[]) ?(post=false) ?(url_encode=false) ~input api service arg (get, pos) -> match Service.input service.s with | Empty -> if post then let content, content_type = encode_params service.s params, Mime.(to_string url_encoded) in pos ~content ~content_type @@ forge api service arg [] else get @@ forge api service arg params | Raw [] -> let content, content_type = input, "application/octet-stream" in pos ~content ~content_type @@ forge api service arg params | Raw [ h ] when h = Mime.url_encoded && input = "" -> let content, content_type = encode_params service.s params, Mime.to_string h in pos ~content ~content_type @@ forge api service arg [] | Raw (h :: _) -> let content, content_type = input, Mime.to_string h in pos ~content ~content_type @@ forge api service arg params | Json enc -> let content, content_type = if url_encode then Url.encode_obj enc input, Mime.(to_string url_encoded) else EzEncoding.construct enc input, Mime.(to_string json) in pos ~content ~content_type @@ forge api service arg params
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>