We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8df15e3 + 631de60 commit 2476e75Copy full SHA for 2476e75
go/Search/BingWebSearchv7.go
@@ -3,6 +3,7 @@ import (
3
"fmt"
4
"net/http"
5
"io/ioutil"
6
+ "os"
7
"time"
8
"encoding/json"
9
)
@@ -64,8 +65,9 @@ type BingAnswer struct {
64
65
66
// Declare the main function. This is required for all Go programs.
67
func main() {
- const endpoint = "https://api.cognitive.microsoft.com/bing/v7.0/search"
68
- token := "YOUR-ACCESS-KEY"
+ // Add your Bing Search V7 endpoint and subscription key to your environment variables.
69
+ const endpoint = os.Getenv("BING_SEARCH_V7_ENDPOINT")
70
+ token := os.Getenv("BING_SEARCH_V7_SUBSCRIPTION_KEY")
71
searchTerm := "Microsoft Cognitive Services"
72
73
// Declare a new GET request.
0 commit comments