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

Remove support of clientType in rond input #246

Open
davidebianchi opened this issue Aug 30, 2023 · 0 comments
Open

Remove support of clientType in rond input #246

davidebianchi opened this issue Aug 30, 2023 · 0 comments
Labels
sdk technical debt This brings or resolves technical debt

Comments

@davidebianchi
Copy link
Member

Is your feature request related to a problem? Please describe

In the rond input it is set the ClientType, which is passed as params to create a new input:

// TODO: before to have a stable interface, remove the usage of clientTypeHeaderKey.
// We could add to the core.Input a map[string]any to add any data passed from
// outside instead
func NewInput(req *http.Request, clientTypeHeaderKey string, pathParams map[string]string, user core.InputUser, responseBody any) (core.Input, error) {
requestBody, err := parseRequestBody(req)
if err != nil {
return core.Input{}, err
}
return core.Input{
ClientType: req.Header.Get(clientTypeHeaderKey),
Request: core.InputRequest{
Method: req.Method,
Path: req.URL.Path,
Headers: req.Header,
Query: req.URL.Query(),
PathParams: pathParams,
Body: requestBody,
},
Response: core.InputResponse{
Body: responseBody,
},
User: user,
}, nil
}

It should be removed since it is the support to a Mia-Platform specific header, and instead use it inside some custom metadata #245.

@fredmaggiowski fredmaggiowski added technical debt This brings or resolves technical debt sdk labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdk technical debt This brings or resolves technical debt
Projects
None yet
Development

No branches or pull requests

2 participants