You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -144,11 +144,12 @@ You can also quote values, e.g. `foo="bar baz"`.
144
144
## JSON
145
145
JSON is the lingua franca of modern web services and it is also the implicit content type bat by default uses:
146
146
147
-
If your command includes some data items, they are serialized as a JSON object by default. bat also automatically sets the following headers, both of which can be overwritten:
147
+
If your command includes some data items, they are serialized as a JSON object by default. bat also automatically sets the following headers, both of which can be overridden:
148
148
149
-
|Content-Type | application/json |
150
-
| -------------| ----------------- |
151
-
|Accept |application/json|
149
+
| header | value |
150
+
| ------------ | ---------------- |
151
+
| Content-Type | application/json |
152
+
| Accept | application/json |
152
153
153
154
You can use --json=true, -j=true to explicitly set Accept to `application/json` regardless of whether you are sending data (it's a shortcut for setting the header via the usual header notation – `bat url Accept:application/json`).
154
155
@@ -252,7 +253,7 @@ There are a couple of default headers that bat sets:
0 commit comments