File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -168,16 +168,23 @@ The `Request` class provides many methods for examining the HTTP request for you
168
168
169
169
$value = Request::server('PATH_INFO');
170
170
171
+ #### Determining If The Request Is Over HTTPS
172
+
173
+ if (Request::secure())
174
+ {
175
+ //
176
+ }
177
+
171
178
#### Determine If The Request Is Using AJAX
172
179
173
180
if (Request::ajax())
174
181
{
175
182
//
176
183
}
177
184
178
- #### Determining If The Request Is Over HTTPS
185
+ #### Detect any type of JSON request
179
186
180
- if (Request::secure ())
187
+ if (Request::ajax() or Request::isJson() or Request::wantsJson ())
181
188
{
182
189
//
183
190
}
@@ -189,4 +196,4 @@ The `Request::format` method will return the requested response format based on
189
196
if (Request::format() == 'json')
190
197
{
191
198
//
192
- }
199
+ }
You can’t perform that action at this time.
0 commit comments