Skip to content

Commit

Permalink
Merge pull request #28 from mpociot/allow-get-requests
Browse files Browse the repository at this point in the history
Allow passing query parameters for GET requests
  • Loading branch information
reinink committed May 14, 2019
2 parents 46fe3a8 + 6a6444f commit 9e4c326
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inertia.js
Expand Up @@ -55,7 +55,8 @@ export default {
return axios({
method: method,
url: url,
data: data,
data: method.toLowerCase() === 'get' ? {} : data,
params: method.toLowerCase() === 'get' ? data : {},
cancelToken: this.cancelToken.token,
headers: {
'Accept': 'text/html, application/xhtml+xml',
Expand Down

0 comments on commit 9e4c326

Please sign in to comment.