Skip to content

Commit 230aef0

Browse files
authored
Consolidate HttpEnabled explaination (#1014)
## Changes <!-- Please summarize your changes. --> The HttpService page currently provides multiple explainers of HttpEnabled - but none under the HttpEnabled property. I've spoken to a few people who have found this confusing, particularly when being linked into this page and missing the summary at the top (especially given that the sub-heading for 'Enable HTTP requests' does not show on the 'On This Page' right-hand navigation. This PR consolidates the explanation on the page under the HttpEnabled property, linking down to it from the summary. If this PR is merged, then the code samples on this page should also be updated to just link to the HttpEnabled property as a single source-of-truth explainer. For example, the astronaut sample currently contains an explanation that doesn't consider setting with command bar, whilst the Pastebin and RequestAsync samples do not mention enabling requests at all. (obviously I can't currently update the samples as they're not present on repo!) <!-- Please link to any applicable information (forum posts, bug reports, etc.). --> ## Checks By submitting your pull request for review, you agree to the following: - [X] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [X] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [X] To the best of my knowledge, all proposed changes are accurate. ---------
1 parent 32ece79 commit 230aef0

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

content/en-us/reference/engine/classes/HttpService.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ description: |
2828
2929
##### Enable HTTP requests
3030
31-
Request-sending methods aren't enabled by default. To send requests, toggle on
32-
**Allow&nbsp;HTTP&nbsp;Requests** through the
33-
[Game Settings](../../../studio/game-settings.md) interface in Studio, or set
34-
`Class.HttpService.HttpEnabled|HttpEnabled` to `true` in the
35-
[Command Bar](../../../studio/ui-overview.md#command-bar) for **unpublished**
36-
experiences:
37-
38-
`game:GetService("HttpService").HttpEnabled = true`
31+
Request-sending methods aren't enabled by default. To send requests, you must
32+
[enable HTTP requests](#HttpEnabled) for your experience.
3933
4034
##### Use in plugins
4135
@@ -87,9 +81,17 @@ properties:
8781
summary: |
8882
Indicates whether HTTP requests can be sent to external websites.
8983
description: |
90-
When set to `true`, you are able to send requests to other websites using
84+
When set to `true`, allows scripts to send requests to websites using
9185
`Class.HttpService:GetAsync()`, `Class.HttpService:PostAsync()`, and
9286
`Class.HttpService:RequestAsync()`.
87+
88+
This property must be toggled on through the
89+
[Game Settings](../../../studio/game-settings.md) interface in Studio, or
90+
for **unpublished** experiences by setting this property to `true` using the
91+
[Command Bar](../../../studio/ui-overview.md#command-bar):
92+
93+
`game:GetService("HttpService").HttpEnabled = true`
94+
9395
code_samples:
9496
type: bool
9597
tags: []

0 commit comments

Comments
 (0)