Simon Cruanes
4b7d9ec769
make CURLOPT_NOSIGNAL=false the default; simplify
build / Build (push) Has been cancelled
2025-01-29 21:55:16 -05:00
Stéphane Lavergne
ebf1e1fc12
Expose underlying no signal in a global setting
2025-01-29 21:46:19 -05:00
Simon Cruanes
49b265ce56
implement http_stream
2024-10-02 12:46:43 -04:00
Simon Cruanes
fbd71baa19
wip: stream response…
2024-10-02 11:43:49 -04:00
Simon Cruanes
e97003644a
refactor: rename files
2024-10-01 12:17:53 -04:00
Simon Cruanes
71a37788ac
feat: add Ezcurl.Cookies module, get/set/transfer them
2024-10-01 12:01:36 -04:00
Simon Cruanes
a8ad44d39e
feat ezcurl: wrap Curl.t in record; add cookie support
2024-10-01 10:59:55 -04:00
Simon Cruanes
d259d85eb7
depend on thread
2023-11-25 00:10:54 -05:00
Simon Cruanes
d41eb2ceb4
fix: global initialization logic is now hidden behind a mutex
2023-11-25 00:10:54 -05:00
Simon Cruanes
be03f25cc0
ocamlformat
2023-06-09 21:06:20 -04:00
Simon Cruanes
73899acdf2
more doc
2023-06-09 21:04:03 -04:00
Simon Cruanes
5bb480235a
remove spurious eprintf
2023-03-09 11:10:50 -05:00
Simon Cruanes
9e7d9be5c3
fix: workaround servers which do not understand Expect header
2023-02-28 11:07:20 -05:00
Simon Cruanes
91cfbc94ad
fix: correctly set size of payload for POST
...
close #12
2023-02-28 11:06:39 -05:00
Simon Cruanes
f70f25d951
make sure to setup PUT correctly
...
follow https://curl.se/libcurl/c/CURLOPT_UPLOAD.html and also set
the method to PUT.
2023-02-07 11:07:39 -05:00
Edwin Török
5ba64ee30a
ezcurl: allow POST with non-form data
...
Currently ezcurl always sets CURLOPT_HTTPPOST, but that means it is not able
to send a custom body that is not a form (e.g. JSON is quite a common use-case
these days).
Add a special case: if the POST params is empty, *and* a 'content' is set, then
just set CURLOPT_POST, but not CURLOPT_HTTPPOST.
Example usage:
```
let contents = Ezjsonm.to_string json in
let config = EZ.Config.(verbose true default) in
match EZ.post ~config ~url ~params:[] ~content:(`String contents) () with
```
Signed-off-by: Edwin Török <edwin.torok@cloud.com>
2023-02-02 12:05:46 -05:00
Simon Cruanes
cfcd23d16a
fix: do not reset client if passed as argument
...
close #7
2023-01-25 13:43:35 -05:00
Simon Cruanes
c568f9e4e3
fix setting of headers
...
close #6
2021-10-07 13:09:23 -04:00
Simon Cruanes
3d12ab0c1d
fix warning
2021-09-29 09:05:28 -04:00
Simon Cruanes
fe35e81fe0
minor changes to improve compatibility
2021-09-29 09:05:05 -04:00
zapashcanon
7b0c8230ae
add a default user-agent
2021-09-29 09:05:05 -04:00
Simon Cruanes
a1e2d7f600
enrich content type so it can be a stream.
...
- content is now either a string, or a callback function writing into
a buffer
- also fix potential performance issue in body reading
- add `?content` to post
2021-07-30 12:43:36 -04:00
Simon Cruanes
6795c5b64a
style
2021-07-22 11:04:34 -04:00
Simon Cruanes
fa37890804
feat: add a way to send content
2019-09-14 12:50:33 -05:00
Simon Cruanes
54e7d1740f
feat: add more methods, add range parameter
2019-09-14 11:28:28 -05:00
Simon Cruanes
637674f6d0
feat: add some printers
2019-09-14 10:54:53 -05:00
Simon Cruanes
d6c687d16c
doc: use mdx to update the readme (and test)
2019-09-14 10:27:06 -05:00
Simon Cruanes
bf31f32a5b
feat: add lwt wrapper
2019-09-14 10:00:38 -05:00
Simon Cruanes
80fc740e39
add Config value
2019-09-13 21:42:33 -05:00
Simon Cruanes
84f3a147a7
initial commit
2019-09-13 18:22:56 -05:00