question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for any HTTP method/verb

See original GitHub issue

Describe the feature I’m implementing an External Authentication service for the popular Ambassador API gateway system (https://www.getambassador.io/reference/services/auth-service) and one of the requirements is that the Extauth handler be able to process the same HTTP verb as the original request. Three problems:

  1. In a a self-service microservices architecture I can’t control what developers are using for HTTP verbs. Ambassador is self serve so they might design an API that uses all the HTTP verbs OR (annoyingly) use custom ones. I need to handle that.

  2. It’s tedious to write handlers for all the HTTP verbs Javalin currently knows how to handle.

  3. Using before is non-obvious (but was suggested by @tipsy on Gitter)

Additional context With regards to point #3 perhaps the best way to do this is something like any(methods: Set<String>) where if any of the methods in the provided set match then the handler is invoked. If methods is empty then it matches all verbs.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
plombardi89commented, Aug 15, 2018

I’m gonna wrap this one up soon (definitely before GH-330). This triggered that issue but we’re still broken on JDK9+ regardless of this change so I’m not gonna block myself waiting to find time to finish the JDK9+ support.

0reactions
tipsycommented, Sep 17, 2018

Don’t worry about it @plombardi89. It is indeed a niche problem, so I will close this as wontfix. If it ever comes up again I will implement it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP request methods - MDN Web Docs
Chrome Edge CONNECT Full support. ChromeYes. Toggle history Full support. Edge12. Toggle history DELETE Full support. ChromeYes. Toggle history Full support. Edge12. Toggle history GET Full...
Read more >
Using HTTP Methods for RESTful Services - REST API Tutorial
The primary or most-commonly-used HTTP verbs (or methods, as they are properly called) are POST, GET, PUT, PATCH, and DELETE. These correspond to...
Read more >
9 HTTP methods and how to use them - Testfully
We do CRUD operations (Create, Read, Update, Delete) by sending HTTP requests with different HTTP methods, sometimes called HTTP verbs.
Read more >
HTTP Verb Tampering - Imperva
HTTP Verb Tampering is an attack that exploits vulnerabilities in HTTP verb (also known as HTTP method) authentication and access control mechanisms.
Read more >
Using HTTP Verbs - Master Ruby Web APIs - Devblast
Sadly, HTML only supports two HTTP methods: GET and POST . You already know GET , as we've used it a few times...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found