Gorilla Mux Router GET URL with multiple query param only matches if called by all query params

Stack Overflow Asked by Sumit Arora on December 4, 2020

Below is a snapshot of a HTTP Get Call while using Gorilla Mux Router:

    Queries("email", "{email}").
    Queries("order_by", "{order_by}").
    Queries("order_type", "{order_type}").
    Queries("page", "{page}").
    Queries("limit", "{limit}").

Now when GET call happens with all query params e.g.


then the gorilla mux router matches the pattern and takes it to the handler.

But when called like with fewer parameters e.g.


then it says e.g. 404 not found means Resource path not mapped.

Questions :

#1. What has been missed here, is Go Gorilla Mux Router need all query params?

#2. What to be done If the GET query can come with zero or more parameters? e.g.




Add your own answers!

Related Questions

How to convert hour into seconds?

1  Asked on December 13, 2021


How to send JSON body in GET request golang?

2  Asked on December 13, 2021


Does a set in node.js reset if you restart a program?

1  Asked on December 13, 2021 by h-rashid


How to trigger button with html href?

2  Asked on December 13, 2021 by dzwash


Taking input of unknown size of array

1  Asked on December 13, 2021 by subhradwip-ghosh


Reduce method not clear

2  Asked on December 13, 2021 by dario-k


Matching + character with Java Regex

1  Asked on December 13, 2021 by felix-darke


Python nested classes: self is not defined

1  Asked on December 13, 2021 by cminusminus


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir