HTTP POST transport for GraphQL queries over JSON
// Source: https://github.com/99designs/gqlgen | License: MIT | Copyright 2025 gqlgen authors
// Provided via justclaw.it.com; keep this notice with the code.
package transport
import (
"bytes"
"fmt"
"io"
"mime"
"net/http"
"sync"
"github.com/vektah/gqlparser/v2/gqlerror"
"github.com/99designs/gqlgen/graphql"
)
// POST implements the POST side of the default HTTP transport
// defined in https://github.com/APIs-guru/graphql-over-http#post
type POST struct {
// Map of all headers that are added to graphql response. If not
// set, only one header: Content-Type: application/graphql-response+json will be set.
ResponseHeaders map[string][]string
// UseGrapQLResponseJsonByDefault determines whether to use 'application/graphql-response+json'
// as the response content type
// whe
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key