|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef __HTTP__
- #define __HTTP__
-
- #module \
- Http
-
- #enum STATUS_SUCCESS = 1
- #enum STATUS_ERROR
-
- #deffunc local \
- Fetch \
- str p_url,\
- local l_res,\
- local l_size
- HTTPLoad p_url
-
- If stat = 0 {
- Repeat
- HTTPInfo l_res, HTTPINFO_MODE
-
- Switch l_res
- Case HTTPMODE_READY
- Case HTTPMODE_NONE
- Case HTTPMODE_ERROR
- Break
- SwEnd
-
- Wait 5
- Loop
-
- If l_res = HTTPMODE_READY {
- HTTPInfo l_size, HTTPINFO_SIZE
-
- SDim data, l_size
- HTTPInfo data, HTTPINFO_DATA
-
- status = STATUS_SUCCESS
-
- Return
- }
- }
-
- HTTPInfo errMsg, HTTPINFO_ERROR
-
- status = STATUS_ERROR
-
- Return
-
- #global
-
- #endif ; not __HTTP__
-
|