Example GET requests #649
-
|
I want to create some sample curl requests for an api that I created using the DGS framework but I am having some trouble with the GET request. Am I able to make GET requests with url parameters? The response that I get when making a GET request is Invalid GraphQL request - no request body was provided. I imagine that with url parameters this won't make sense but I have seen other graphql APIs offer GET support. Sample curl request sans encoding: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Usually the query is sent as the body of a POST |
Beta Was this translation helpful? Give feedback.
-
|
The framework only supports POST requests. Note that it supports both Besides curl, you can also use the HTTP Request feature in Intellij, and of course there is |
Beta Was this translation helpful? Give feedback.
The framework only supports POST requests. Note that it supports both
application/jsonandapplication/graphql. The latter is really nice when using something like curl, because you don't have to quote/escape things.Besides curl, you can also use the HTTP Request feature in Intellij, and of course there is
/graphiql.