FluNetwork add openLog funcation

This commit is contained in:
朱子楚\zhuzi
2023-12-07 23:01:09 +08:00
parent 13223a11a2
commit 7086df10f0
6 changed files with 49 additions and 4 deletions

View File

@ -25,7 +25,7 @@ Item {
}
Component.onCompleted: {
FluNetwork.openLog = true
FluNetwork.openLog = false
FluNetwork.setInterceptor(function(param){
param.addHeader("Token","000000000000000000000")
})

View File

@ -280,6 +280,21 @@ FluContentPage{
.go(callable)
}
}
FluButton{
implicitWidth: parent.width
implicitHeight: 36
text: "Open Log"
onClicked: {
text_info.text = ""
FluNetwork.postJson("https://httpbingo.org/post")
.add("name","孙悟空")
.add("age",500)
.add("address","花果山水帘洞")
.openLog(true)
.bind(root)
.go(callable)
}
}
FluButton{
implicitWidth: parent.width
implicitHeight: 36

View File

@ -25,7 +25,7 @@ Item {
}
Component.onCompleted: {
FluNetwork.openLog = true
FluNetwork.openLog = false
FluNetwork.setInterceptor(function(param){
param.addHeader("Token","000000000000000000000")
})

View File

@ -281,6 +281,21 @@ FluContentPage{
.go(callable)
}
}
FluButton{
implicitWidth: parent.width
implicitHeight: 36
text: "Open Log"
onClicked: {
text_info.text = ""
FluNetwork.postJson("https://httpbingo.org/post")
.add("name","孙悟空")
.add("age",500)
.add("address","花果山水帘洞")
.openLog(true)
.bind(root)
.go(callable)
}
}
FluButton{
implicitWidth: parent.width
implicitHeight: 36