mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 17:44:05 +08:00
opt some
This commit is contained in:
parent
c92eda968f
commit
c9e6fb5a50
@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func _spide_create(m *ice.Message, name, address string) {
|
func _spide_create(m *ice.Message, name, address string) {
|
||||||
if uri, e := url.Parse(address); !m.Warn(e != nil || address == "", address) {
|
if uri, e := url.Parse(address); !m.Warn(e != nil || address == "", ice.ErrNotValid, address) {
|
||||||
m.Logs(mdb.CREATE, SPIDE, name, ADDRESS, address)
|
m.Logs(mdb.CREATE, SPIDE, name, ADDRESS, address)
|
||||||
dir, file := path.Split(uri.EscapedPath())
|
dir, file := path.Split(uri.EscapedPath())
|
||||||
mdb.HashCreate(m, CLIENT_NAME, name)
|
mdb.HashCreate(m, CLIENT_NAME, name)
|
||||||
@ -43,25 +43,15 @@ func _spide_show(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
cache, save := "", ""
|
cache, save := "", ""
|
||||||
switch arg[1] {
|
switch arg[1] {
|
||||||
case SPIDE_RAW:
|
case SPIDE_RAW, SPIDE_MSG, SPIDE_CACHE:
|
||||||
cache, arg = arg[1], arg[1:]
|
|
||||||
case SPIDE_MSG:
|
|
||||||
cache, arg = arg[1], arg[1:]
|
cache, arg = arg[1], arg[1:]
|
||||||
case SPIDE_SAVE:
|
case SPIDE_SAVE:
|
||||||
cache, save, arg = arg[1], arg[2], arg[2:]
|
cache, save, arg = arg[1], arg[2], arg[2:]
|
||||||
case SPIDE_CACHE:
|
|
||||||
cache, arg = arg[1], arg[1:]
|
|
||||||
}
|
}
|
||||||
method := kit.Select(SPIDE_POST, msg.Append(CLIENT_METHOD))
|
method := kit.Select(http.MethodPost, msg.Append(CLIENT_METHOD))
|
||||||
switch arg = arg[1:]; arg[0] {
|
switch arg = arg[1:]; arg[0] {
|
||||||
case SPIDE_GET:
|
case http.MethodGet, http.MethodPut, http.MethodPost, http.MethodDelete:
|
||||||
method, arg = SPIDE_GET, arg[1:]
|
method, arg = arg[0], arg[1:]
|
||||||
case SPIDE_PUT:
|
|
||||||
method, arg = SPIDE_PUT, arg[1:]
|
|
||||||
case SPIDE_POST:
|
|
||||||
method, arg = SPIDE_POST, arg[1:]
|
|
||||||
case SPIDE_DELETE:
|
|
||||||
method, arg = SPIDE_DELETE, arg[1:]
|
|
||||||
}
|
}
|
||||||
uri, arg := arg[0], arg[1:]
|
uri, arg := arg[0], arg[1:]
|
||||||
body, head, arg := _spide_body(m, method, arg...)
|
body, head, arg := _spide_body(m, method, arg...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user