You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 10, 2020. It is now read-only.
This library can be used to make HTTP and HTTPS requests in [PicoLisp](http://picolisp.com), with support for authentication.
6
6
@@ -12,9 +12,10 @@ Please read [EXPLAIN.md](EXPLAIN.md) to learn more about PicoLisp and this HTTPS
12
12
2.[Getting Started](#getting-started)
13
13
3.[Usage](#usage)
14
14
4.[Examples](#examples)
15
-
5.[Alternatives](#alternatives)
16
-
6.[Contributing](#contributing)
17
-
7.[License](#license)
15
+
5.[Testing](#testing)
16
+
6.[Alternatives](#alternatives)
17
+
7.[Contributing](#contributing)
18
+
8.[License](#license)
18
19
19
20
# Requirements
20
21
@@ -39,9 +40,15 @@ Once compiled, the shared library is symlinked as:
39
40
40
41
The `https.l` file searches for `lib/libneon.so`, relative to its current directory.
41
42
43
+
### Updating
44
+
45
+
This library uses git submodules, type this keep everything updated:
46
+
47
+
./update.sh
48
+
42
49
# Usage
43
50
44
-
All functions are publicly accessible and namespaced with `(symbols 'https)` (or the prefix: `https~`), but only the following are necessary:
51
+
Only the following functions are exported publicly, and namespaced with `(symbols 'https)` (or the prefix: `https~`):
45
52
46
53
***(uriparse Url)** parses a sanitized URL into its separate parts
47
54
-`Url`_String_: a URL string to be parsed (does not encode the URL)
@@ -64,6 +71,8 @@ All functions are publicly accessible and namespaced with `(symbols 'https)` (or
64
71
-`Filename`_String_ or _Flag (optional)_: can be a full path to a filename to store the HTTP Body content, the flag `T` to generate a random filename and store in a tmp dir (`~/.pil/tmp`), or `NIL` to return the Body in the `Response` list
65
72
***(req Method Url Headers Filename Body)**: performs an HTTP requeste using the `Method` you provide. The arguments to `req` are the same as the convenience methods list above.
66
73
74
+
> **Note:** These functions are not namespace [local symbols](http://software-lab.de/doc/refL.html#local), which means they would redefine symbols with the same name in the `'pico` namespace
75
+
67
76
### Notes
68
77
69
78
* A successful result will return a list. Failures return `NIL` or throw an `'InternalError`.
@@ -262,6 +271,12 @@ s>^J")
262
271
" . "text/html; charset=UTF-8")) )
263
272
```
264
273
274
+
# Testing
275
+
276
+
This library now comes with full [unit tests](https://github.com/aw/picolisp-unit). To run the tests, run:
277
+
278
+
./test.l
279
+
265
280
# Alternatives
266
281
267
282
The following are alternatives written in pure PicoLisp. They are limited by pipe/read syscalls and shell exec commands.
0 commit comments