Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Auto render does not obey http headers correctly #948

Open
deanroker123 opened this issue Mar 1, 2018 · 1 comment
Open

Auto render does not obey http headers correctly #948

deanroker123 opened this issue Mar 1, 2018 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@deanroker123
Copy link

It appears as though the auto render function looks at the content type header over the accept header to determine what to return to the client.

As far as I know content type gives an indication to the receiver what is in the request and accept tells the receiver what the client expects to receive back.

So a client posting json to the server would have that as the content type and an accept header set to html so it gets an html document back.

Or could set the both the same to post json and get json back.

@forrest321
Copy link
Contributor

Relevant code starts here:

func (e *Engine) Auto(ctx context.Context, i interface{}) Renderer {

@stanislas-m stanislas-m added the enhancement New feature or request label Apr 19, 2018
@sio4 sio4 added this to the Backlog milestone Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants