Skip to content

Conversation

abourget
Copy link

I noticed in handler.go:

	v1 := req.Header.Get("Accept") == "application/vnd.nsq; version=1.0"

	if !v1 {
		value = struct {
			StatusCode int         `json:"status_code"`
			StatusText string      `json:"status_txt"`
			Data       interface{} `json:"data"`
		}{
			StatusCode: status,
			StatusText: text,
			Data:       value,
		}
	}

We could also do something similar here to support both versions.. a bit more refactoring would need to happen through, to bubble up the headers alongside the ret, or the ret could be a channel of more structured objects, like the LookupResult itself..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant