Skip to content

Commit cd54824

Browse files
fix: use fully qualified https:// URLs in documentation examples
1 parent 17f3736 commit cd54824

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Each namespace has its own authentication requirements and access patterns. Whil
1717
from glean.api_client import Glean
1818
import os
1919

20-
with Glean(api_token="client-token", server_url="mycompany-be.glean.com") as glean:
20+
with Glean(api_token="client-token", server_url="https://mycompany-be.glean.com") as glean:
2121
search_response = glean.client.search.query(query="search term")
2222

2323
print(search_response)
@@ -26,7 +26,7 @@ with Glean(api_token="client-token", server_url="mycompany-be.glean.com") as gle
2626
from glean.api_client import Glean, models
2727
import os
2828

29-
with Glean(api_token="indexing-token", server_url="mycompany-be.glean.com") as glean:
29+
with Glean(api_token="indexing-token", server_url="https://mycompany-be.glean.com") as glean:
3030
document_response = glean.indexing.documents.index(
3131
document=models.Document(
3232
id="doc-123",
@@ -753,11 +753,11 @@ from glean.api_client import Glean
753753

754754
glean = Glean(
755755
api_token="your-api-token",
756-
server_url="mycompany-be.glean.com",
756+
server_url="https://mycompany-be.glean.com",
757757
)
758758
```
759759

760-
The SDK accepts schemeless URLs (e.g., `"mycompany-be.glean.com"`); the `https://` prefix is added automatically.
760+
Schemeless URLs (e.g., `"mycompany-be.glean.com"`) are also accepted — the SDK will automatically prepend `https://`.
761761

762762
You can also configure the server URL via the `GLEAN_SERVER_URL` environment variable.
763763

@@ -781,7 +781,7 @@ import os
781781

782782

783783
with Glean(
784-
server_url="mycompany-be.glean.com",
784+
server_url="https://mycompany-be.glean.com",
785785
api_token=os.getenv("GLEAN_API_TOKEN", ""),
786786
) as glean:
787787

@@ -1008,7 +1008,7 @@ from glean.api_client import Glean
10081008

10091009
glean = Glean(
10101010
api_token=os.environ.get("GLEAN_API_TOKEN", ""),
1011-
server_url="mycompany-be.glean.com",
1011+
server_url="https://mycompany-be.glean.com",
10121012
)
10131013
```
10141014

@@ -1021,7 +1021,7 @@ from glean.api_client import Glean
10211021

10221022
glean = Glean(
10231023
api_token=os.environ.get("GLEAN_API_TOKEN", ""),
1024-
server_url="mycompany-be.glean.com",
1024+
server_url="https://mycompany-be.glean.com",
10251025
exclude_deprecated_after="2026-10-15",
10261026
include_experimental=True,
10271027
)

0 commit comments

Comments
 (0)