Simplify but Complete Catalog
This commit is contained in:
9
ws.go
9
ws.go
@@ -26,7 +26,7 @@ func main() {
|
||||
// ws://localhost:8087/oc/processing/decentralized/all/search/<term>
|
||||
// ws://localhost:8087/oc/storage/decentralized/all/search/<term>
|
||||
// ws://localhost:8087/oc/workflow/decentralized/all/search/<term>
|
||||
url := "ws://localhost:8087/oc/resource/decentralized/all/search/builder"
|
||||
url := "ws://localhost:8087/oc/decentralized/all/resource/search/sar"
|
||||
token := ""
|
||||
|
||||
if len(args) >= 1 {
|
||||
@@ -43,7 +43,6 @@ func main() {
|
||||
}
|
||||
if token != "" {
|
||||
config.Header.Set("Authorization", "Bearer "+token)
|
||||
fmt.Printf("Token : %s...\n", token[:min(20, len(token))])
|
||||
}
|
||||
|
||||
fmt.Printf("Connexion à : %s\n", url)
|
||||
@@ -89,10 +88,10 @@ func main() {
|
||||
idleTimer.Reset(time.Duration(*timeout) * time.Second)
|
||||
var data any
|
||||
if err := json.Unmarshal([]byte(raw), &data); err == nil {
|
||||
b, _ := json.MarshalIndent(data, "", " ")
|
||||
fmt.Println(string(b))
|
||||
///b, _ := json.MarshalIndent(data, "", " ")
|
||||
fmt.Println(data)
|
||||
} else {
|
||||
fmt.Printf("Message brut : %s\n", raw)
|
||||
fmt.Printf("Message brut : %s\n", raw, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user