すくすくゴートうちゃん Android 版(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

http.mod.hsp 690 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef __HTTP__
  2. #define __HTTP__
  3. #module \
  4. Http
  5. #enum STATUS_SUCCESS = 1
  6. #enum STATUS_ERROR
  7. #deffunc local \
  8. Fetch \
  9. str p_url,\
  10. local l_size
  11. HTTPLoad p_url
  12. If stat = 0 {
  13. Repeat
  14. HTTPInfo l_res, HTTPINFO_MODE
  15. Switch l_res
  16. Case HTTPMODE_READY
  17. Case HTTPMODE_NONE
  18. Case HTTPMODE_ERROR
  19. Break
  20. SwEnd
  21. Wait 5
  22. Loop
  23. If l_res = HTTPMODE_READY {
  24. HTTPInfo l_size, HTTPINFO_SIZE
  25. SDim data, l_size
  26. HTTPInfo data, HTTPINFO_DATA
  27. status = STATUS_SUCCESS
  28. }
  29. Else {
  30. HTTPInfo errMsg, HTTPINFO_ERROR
  31. status = STATUS_ERROR
  32. }
  33. }
  34. Else {
  35. HTTPInfo errMsg, HTTPINFO_ERROR
  36. status = STATUS_ERROR
  37. }
  38. Return
  39. #global
  40. #endif ; not __HTTP__