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

Bug - GET Params #9

Closed
marcos-dev88 opened this issue Feb 23, 2023 · 7 comments
Closed

Bug - GET Params #9

marcos-dev88 opened this issue Feb 23, 2023 · 7 comments
Assignees

Comments

@marcos-dev88
Copy link
Collaborator

Atualmente estamos tendo um erro ao pegar os parâmetros na request após dos definidos.

exemplo:

working: /api/:msgID

Not Working: /api/:msg/some

@jeffotoni
Copy link
Owner

app := quick.New() app.Get("/v1/customer/:param1/:param2/product/:param3", QuickHandler) app.Get("/v1/customer/:param1/:param2/product/:param3/path1/:param4/path2/:param5", QuickHandler)
curl -i -XGET 'localhost:8080/v1/customer/val1/val2/product/val3'
curl -i -XGET 'localhost:8080/v1/customer/val1/val2/product/val3/path1/val4/path2/val5'

@marcos-dev88
Copy link
Collaborator Author

@jeffotoni, realizado o ajuste no PR Bug-09

@jeffotoni
Copy link
Owner

image

@marcos-dev88
Copy link
Collaborator Author

Vou verificar, assim que estiver concluído o ajuste mando o PR aqui novamente @jeffotoni .

@marcos-dev88
Copy link
Collaborator Author

Boa noite @jeffotoni , realizado o ajuste, segue as evidências:

path apenas '/'
`curl -vi -XGET 'http://localhost:8080/val1/val2/val3/some'
Note: Unnecessary use of -X or --request, GET is already inferred.

  • Trying 127.0.0.1:8080...
  • Connected to localhost (127.0.0.1) port 8080 (#0)

GET /val1/val2/val3/some HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.87.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    HTTP/1.1 200 OK
    < Content-Type: application/json
    Content-Type: application/json
    < Date: Sat, 25 Feb 2023 01:52:20 GMT
    Date: Sat, 25 Feb 2023 01:52:20 GMT
    < Content-Length: 0
    Content-Length: 0

<

  • Connection #0 to host localhost left intact`

Apenas com o path
`$ curl -vi -XGET 'http://localhost:8080/some'
Note: Unnecessary use of -X or --request, GET is already inferred.

  • Trying 127.0.0.1:8080...
  • Connected to localhost (127.0.0.1) port 8080 (#0)

GET /some HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.87.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    HTTP/1.1 200 OK
    < Content-Type: application/json
    Content-Type: application/json
    < Date: Sat, 25 Feb 2023 01:51:42 GMT
    Date: Sat, 25 Feb 2023 01:51:42 GMT
    < Content-Length: 0
    Content-Length: 0

<

  • Connection #0 to host localhost left intact`

funcionamento com query streing:

`curl -vi -XGET 'http://localhost:8080/some?val=1'
Note: Unnecessary use of -X or --request, GET is already inferred.

  • Trying 127.0.0.1:8080...
  • Connected to localhost (127.0.0.1) port 8080 (#0)

GET /some?val=1 HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.87.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    HTTP/1.1 200 OK
    < Content-Type: application/json
    Content-Type: application/json
    < Date: Sat, 25 Feb 2023 02:08:39 GMT
    Date: Sat, 25 Feb 2023 02:08:39 GMT
    < Content-Length: 0
    Content-Length: 0

<

  • Connection #0 to host localhost left intact`

@marcos-dev88
Copy link
Collaborator Author

Bug resolvido no PR Bug-9

@jeffotoni
Copy link
Owner

Continua bugado neste cenário

image

jeffotoni pushed a commit that referenced this issue Mar 5, 2023
This issue was closed.
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

No branches or pull requests

2 participants