Skip to content

Commit

Permalink
Concise sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Mar 25, 2024
1 parent 9176f1a commit f89a4e8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ echo $resource->get('page://sekai/?name=World'); // "greeting": "Hello World" fr
method := "get"
uri := "/user?id=1
response, err := ResourceInvoke(hostname, port, method, uri)
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println("Response Code:", response.Code)
fmt.Println("Response Headers:", response.Headers)
fmt.Println("Raw Response JsonValue: ", response.JsonValue)
Expand All @@ -105,9 +102,6 @@ echo $resource->get('page://sekai/?name=World'); // "greeting": "Hello World" fr
method = "get"
uri = "/user?id=1"
response = ResourceInvoke(hostname, port, method, uri)
if not response:
print("Request failed.")
return
print("Response Code:", response.code)
print("Response Headers:", response.headers)
Expand Down

0 comments on commit f89a4e8

Please sign in to comment.