| 1723 | } |
| 1724 | |
| 1725 | static int http_get_status(const char *buf) |
| 1726 | { |
| 1727 | const char *p = buf; |
| 1728 | while (*p != ' ' && *p != '\0') |
| 1729 | p++; |
| 1730 | if (*p != ' ') |
| 1731 | return 0; |
| 1732 | while (*p == ' ') |
| 1733 | p++; |
| 1734 | return atoi(p); |
| 1735 | } |
| 1736 | |
| 1737 | static JSValue js_std_urlGet(JSContext *ctx, JSValueConst this_val, |
| 1738 | int argc, JSValueConst *argv) |