Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport for application/x-www-form-urlencoded content type #2611

Merged
merged 3 commits into from
Apr 8, 2023

Commits on Apr 7, 2023

  1. Renamed 'form' transport to 'form_multipart'.

    There are multiple ways form data can be encoded. 'multipart' is
    just one of them - there are also 'application/x-www-form-urlencoded'
    (which will be added in next commit) and 'text/plain' encodings.
    
    Let each encoding have it's own form_xxxx file and tests.
    RatkoR committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    feefead View commit details
    Browse the repository at this point in the history
  2. Adds transport for application/x-www-form-urlencoded content type.

    This commit adds transport that handles form POST with content
    type set to 'application/x-www-form-urlencoded'.
    
    Form body can be json, urlencoded parameters or plain text.
    
    Example:
    
    ```
     curl -X POST 'http://server/query' -d '{name}' -H "Content-Type: application/x-www-form-urlencoded"
    ```
    
    Enable it in your GQL server with:
    
    ```
    srv.AddTransport(transport.UrlEncodedForm{})
    ```
    RatkoR committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    f0aeb3a View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2023

  1. golangci-lint: change ifElseChain to switch.

    No other changes but this rewrite to switch.
    RatkoR committed Apr 8, 2023
    Configuration menu
    Copy the full SHA
    7f8b3a6 View commit details
    Browse the repository at this point in the history