Browse Source

HTTP リクエストの手法変更(モヂュール化も検討)

main
みてるぞ 1 year ago
parent
commit
f46a18353c
1 changed files with 34 additions and 2 deletions
  1. +34
    -2
      modules/user.mod.hsp

+ 34
- 2
modules/user.mod.hsp View File

@@ -7,14 +7,46 @@ User
#deffunc local \ #deffunc local \
Create \ Create \
str p_name,\ str p_name,\
local l_res,\
local l_size,\
local l_data local l_data
HTTPLoad CREATE_URL + "?name=" + p_name HTTPLoad CREATE_URL + "?name=" + p_name
HTTPInfo l_data

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 l_data, l_size

HTTPInfo l_data, HTTPINFO_DATA
Split l_data, ",", l_data

id = l_data.0
pass = l_data.1
inheritanceCode = l_data.2

Return
}
}


id = 0 id = 0
pass = "" pass = ""
inheritanceCode = ""


Return
Return -1


#deffunc local \ #deffunc local \
Fetch \ Fetch \


Loading…
Cancel
Save