Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49caed4

Browse files
subatoiguntrip
andauthored
Change styling of cURL to curl (#33926)
Co-authored-by: Steve Guntrip <[email protected]>
1 parent 7eb65d4 commit 49caed4

14 files changed

Lines changed: 32 additions & 33 deletions

File tree

content/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ defaultPlatform: linux
227227

228228
### `defaultTool`
229229

230-
- Purpose: Override the initial tool selection for a page, where the tool refers to the application the reader is using to work with GitHub (such as GitHub.com's web UI, the GitHub CLI, or GitHub Desktop) or the GitHub APIs (such as cURL or the GitHub CLI). For more information about the tool selector, see [Markup reference for GitHub Docs](../contributing/content-markup-reference.md#tool-tags). If this frontmatter is omitted, then the tool-specific content matching the GitHub web UI is shown by default. If a user has indicated a tool preference (by clicking on a tool tab), then the user's preference will be applied instead of the default value.
230+
- Purpose: Override the initial tool selection for a page, where the tool refers to the application the reader is using to work with GitHub (such as GitHub.com's web UI, the GitHub CLI, or GitHub Desktop) or the GitHub APIs. For more information about the tool selector, see [Markup reference for GitHub Docs](../contributing/content-markup-reference.md#tool-tags). If this frontmatter is omitted, then the tool-specific content matching the GitHub web UI is shown by default. If a user has indicated a tool preference (by clicking on a tool tab), then the user's preference will be applied instead of the default value.
231231
- Type: `String`, one of: `webui`, `cli`, `desktop`, `curl`, `codespaces`, `vscode`, `importer_cli`, `graphql`, `powershell`, `bash`, `javascript`.
232232
- Optional.
233233

content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Specifically, you can download CSV reports that list
6464

6565
You can also access these reports programmatically via standard HTTP authentication with a site admin account. You must use a {% data variables.product.pat_v1 %} with the `site_admin` scope. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)."
6666

67-
For example, here is how you would download the "all users" report using cURL:
67+
For example, here is how you would download the "all users" report in a `curl` command:
6868

6969
```shell
7070
curl -L -u USERNAME:TOKEN http(s)://HOSTNAME/stafftools/reports/all_users.csv

content/developers/apps/getting-started-with-apps/about-apps.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ For more on {% data variables.product.prodname_oauth_apps %}, see "[Creating an
7676

7777
A [{% data variables.product.pat_generic %}](/articles/creating-a-personal-access-token-for-the-command-line/) is a string of characters that functions similarly to an [OAuth token](/apps/building-oauth-apps/authorizing-oauth-apps/) in that you can specify its permissions via [scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A {% data variables.product.pat_generic %} is also similar to a password, but you can have many of them and you can revoke access to each one at any time.
7878

79-
As an example, you can enable a {% data variables.product.pat_generic %} to write to your repositories. If then you run a cURL command or write a script that [creates an issue](/rest/reference/issues#create-an-issue) in your repository, you would pass the {% data variables.product.pat_generic %} to authenticate. You can store the {% data variables.product.pat_generic %} as an environment variable to avoid typing it every time you use it.
79+
As an example, you can enable a {% data variables.product.pat_generic %} to write to your repositories. If then you run a `curl` command or write a script that [creates an issue](/rest/reference/issues#create-an-issue) in your repository, you would pass the {% data variables.product.pat_generic %} to authenticate. You can store the {% data variables.product.pat_generic %} as an environment variable to avoid typing it every time you use it.
8080

8181
Keep these ideas in mind when using {% data variables.product.pat_generic %}s:
8282

8383
* Remember to use this token to represent yourself only.
84-
* You can perform one-off cURL requests.
84+
* You can perform one-off `curl` requests.
8585
* You can run personal scripts.
8686
* Don't set up a script for your whole team or company to use.
8787
* Don't set up a shared personal account to act as a bot user.
@@ -99,7 +99,7 @@ Consider these questions about how your integration needs to behave and what it
9999
* Will my integration act only as me, or will it act more like an application?
100100
* Do I want it to act independently of me as its own entity?
101101
* Will it access everything that I can access, or do I want to limit its access?
102-
* Is it simple or complex? For example, {% data variables.product.pat_generic %}s are good for simple scripts and cURLs, whereas an {% data variables.product.prodname_oauth_app %} can handle more complex scripting.
102+
* Is it simple or complex? For example, {% data variables.product.pat_generic %}s are good for simple scripts and `curl` commands, whereas an {% data variables.product.prodname_oauth_app %} can handle more complex scripting.
103103

104104
## Requesting support
105105

content/developers/apps/guides/using-content-attachments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ mutation {
106106
}
107107
}
108108
```
109-
Example cURL:
109+
Example `curl` command:
110110

111111
```shell
112112
curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \

content/graphql/guides/forming-calls-with-graphql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ The endpoint remains constant no matter what operation you perform.
4747

4848
## Communicating with GraphQL
4949

50-
Because GraphQL operations consist of multiline JSON, GitHub recommends using the [Explorer](/graphql/guides/using-the-explorer) to make GraphQL calls. You can also use cURL or any other HTTP-speaking library.
50+
Because GraphQL operations consist of multiline JSON, GitHub recommends using the [Explorer](/graphql/guides/using-the-explorer) to make GraphQL calls. You can also use `curl` or any other HTTP-speaking library.
5151

5252
In REST, [HTTP verbs](/rest#http-verbs) determine the operation performed. In GraphQL, you'll provide a JSON-encoded body whether you're performing a query or a mutation, so the HTTP verb is `POST`. The exception is an [introspection query](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api), which is a simple `GET` to the endpoint. For more information on GraphQL versus REST, see "[Migrating from REST to GraphQL](/graphql/guides/migrating-from-rest-to-graphql)."
5353

54-
To query GraphQL using cURL, make a `POST` request with a JSON payload. The payload must contain a string called `query`:
54+
To query GraphQL in a `curl` command, make a `POST` request with a JSON payload. The payload must contain a string called `query`:
5555

5656
```shell
5757
curl -H "Authorization: bearer TOKEN" -X POST -d " \

content/graphql/guides/migrating-graphql-global-node-ids.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Additionally, if you currently decode the legacy IDs to extract type information
2828

2929
To facilitate migration to the new ID format, you can use the `X-Github-Next-Global-ID` header in your GraphQL API requests. The value of the `X-Github-Next-Global-ID` header can be `1` or `0`. Setting the value to `1` will force the response payload to always use the new ID format for any object that you requested the `id` field for. Setting the value to `0` will revert to default behavior, which is to show the legacy ID or new ID depending on the object creation date.
3030

31-
Here is an example request using cURL:
31+
Here is an example request using a `curl` command:
3232

3333
```
3434
$ curl \

content/graphql/guides/using-the-explorer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ variables {
8888
}
8989
```
9090

91-
This is the correct format to submit the call via a cURL `POST` (as long as you [escape newlines](/graphql/guides/forming-calls-with-graphql#communicating-with-graphql)).
91+
This is the correct format to submit the call using a `POST` request in a `curl` command (as long as you [escape newlines](/graphql/guides/forming-calls-with-graphql#communicating-with-graphql)).
9292

9393
If you want to run the call in the Explorer, enter the `query` segment in the main pane and the variables in the **Query Variables** pane below it. Omit the word `variables` from the Explorer:
9494

content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This article demonstrates how to use the GraphQL API to manage a project. For mo
2121

2222
{% curl %}
2323

24-
In all of the following cURL examples, replace `TOKEN` with a token that has the `read:project` scope (for queries) or `project` scope (for queries and mutations). The token can be a {% data variables.product.pat_v1 %} for a user or an installation access token for a {% data variables.product.prodname_github_app %}. For more information about creating a {% data variables.product.pat_generic %}, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about creating an installation access token for a {% data variables.product.prodname_github_app %}, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)."
24+
In all of the following `curl` command examples, replace `TOKEN` with a token that has the `read:project` scope (for queries) or `project` scope (for queries and mutations). The token can be a {% data variables.product.pat_v1 %} for a user or an installation access token for a {% data variables.product.prodname_github_app %}. For more information about creating a {% data variables.product.pat_generic %}, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about creating an installation access token for a {% data variables.product.prodname_github_app %}, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)."
2525

2626
{% endcurl %}
2727

content/rest/guides/getting-started-with-the-rest-api.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ miniTocMaxHeadingLevel: 3
1414

1515
## About the {% data variables.product.prodname_dotcom %} REST API
1616

17-
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API using {% data variables.product.prodname_cli %}, JavaScript, or cURL. For a quickstart guide, see "[Quickstart for GitHub REST API](/rest/quickstart)."
17+
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API using {% data variables.product.prodname_cli %}, JavaScript, or `curl`. For a quickstart guide, see "[Quickstart for GitHub REST API](/rest/quickstart)."
1818

1919
When you make a request to the REST API, you will specify an HTTP method and a path. Additionally, you might also specify request headers and path, query, or body parameters. The API will return the response status code, response headers, and potentially a response body.
2020

@@ -83,7 +83,7 @@ curl --request GET \
8383

8484
{% note %}
8585

86-
**Note**: If you get a message similar to "command not found: curl", you may need to download and install cURL. For more information, see [the cURL project download page](https://curl.se/download.html).
86+
**Note**: If you get a message similar to "command not found: curl", you may need to download and install `curl`. For more information, see [the curl project download page](https://curl.se/download.html).
8787

8888
{% endnote %}
8989

@@ -150,15 +150,15 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
150150

151151
**Warning**: Treat your access token like a password.
152152

153-
To help keep your account secure, you can use {% data variables.product.prodname_cli %} instead of cURL. {% data variables.product.prodname_cli %} will take care of authentication for you. For more information, see the {% data variables.product.prodname_cli %} version of this page.
153+
To help keep your account secure, you can use {% data variables.product.prodname_cli %} instead of `curl` commands. {% data variables.product.prodname_cli %} will take care of authentication for you. For more information, see the {% data variables.product.prodname_cli %} version of this page.
154154

155155
{% ifversion ghec or fpt %}You can also store your token as a {% data variables.product.prodname_codespaces %} secret and use the command line through {% data variables.product.prodname_codespaces %}. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)."{% endif %}
156156

157157
If these options are not possible, consider using another service such as [the 1Password CLI](https://developer.1password.com/docs/cli/secret-references/) to store your token securely.
158158

159159
{% endwarning %}
160160

161-
With cURL, you will send an `Authorization` header with your token. Replace `YOUR-TOKEN` with your token:
161+
In `curl` commands, you will send an `Authorization` header with your token. Replace `YOUR-TOKEN` with your token:
162162

163163
```shell
164164
curl --request GET \
@@ -270,7 +270,7 @@ jobs:
270270

271271
{% curl %}
272272

273-
You can also use the `run` keyword to execute cURL commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
273+
You can also use the `run` keyword to execute `curl` commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
274274

275275
{% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
276276

@@ -321,7 +321,7 @@ await octokit.request("GET /octocat", {
321321

322322
{% curl %}
323323

324-
To send a header with cURL, use the `--header` or `-H` flag followed by the header in `key: value` format.
324+
To send a header in a `curl` command, use the `--header` or `-H` flag followed by the header in `key: value` format.
325325

326326
```shell
327327
curl --request GET \
@@ -439,7 +439,7 @@ await octokit.request("GET /repos/{owner}/{repo}/issues", {
439439

440440
{% curl %}
441441

442-
For cURL, add a `?` to the end of the path, then append your query parameter name and value in the form `parameter_name=value`. Separate multiple query parameters with `&`.
442+
For `curl` commands, add a `?` to the end of the path, then append your query parameter name and value in the form `parameter_name=value`. Separate multiple query parameters with `&`.
443443

444444
```shell
445445
curl --request GET \
@@ -511,7 +511,7 @@ If you are using a {% data variables.product.pat_v2 %}, you must replace `octoca
511511

512512
{% endif %}
513513

514-
For cURL, use the `--data` flag to pass the body parameters in a JSON object.
514+
For `curl` commands, use the `--data` flag to pass the body parameters in a JSON object.
515515

516516
```shell
517517
curl --request POST \

content/rest/overview/other-authentication-methods.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ This approach is useful if your tools only support Basic Authentication but you
6464
To use Basic Authentication with the {% data variables.product.product_name %} API, simply send the username and
6565
password associated with the account.
6666

67-
For example, if you're accessing the API via [cURL][curl], the following command
68-
would authenticate you if you replace `<username>` with your {% data variables.product.product_name %} username.
69-
(cURL will prompt you to enter the password.)
67+
For example, the following [`curl` command][curl] to the API would authenticate you if you replace `<username>` with your {% data variables.product.product_name %} username.
68+
(curl will prompt you to enter the password.)
7069

7170
```shell
7271
$ curl -u USERNAME {% data variables.product.api_url_pre %}/user

0 commit comments

Comments
 (0)