GET method with @RequestLine @Param containing a question mark (/index.php?/) is converted to POST
See original GitHub issueHi. I came from https://github.com/OpenFeign/feign/issues/838 This has been fixed in https://github.com/OpenFeign/feign/pull/841
When i use the code from last comment:
@RequestLine(value = "GET /index.php?/api/v2/get_tests/{runId}")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
Test[] getTestsByRunId(@Param(value = "runId") Integer runId);
i get the following error even though i use the GET method (hide server & Authorization string):
[feign.Logger] ---> GET https://testrail.server.domen/testrail/index.php?/api/v2/get_tests/999 HTTP/1.1
[feign.Logger] Accept: */*
[feign.Logger] Authorization: Basic *hidden*
[feign.Logger] Content-Length: 13
[feign.Logger] Content-Type: application/json
[feign.Logger]
[feign.Logger] {"runId":999}
[feign.Logger] ---> END HTTP (13-byte body)
[feign.Logger] <--- HTTP/1.1 404 File Not Found (974ms)
[feign.Logger] connection: keep-alive
[feign.Logger] content-length: 61
[feign.Logger] content-type: application/json; charset=utf-8
[feign.Logger] date: Thu, 03 Oct 2019 08:58:19 GMT
[feign.Logger] server: nginx/1.10.2
[feign.Logger] x-powered-by: PHP/5.4.45
[feign.Logger]
[feign.Logger] {"error":"Unsupported HTTP method \"post\" for this action."}
[feign.Logger] <--- END HTTP (61-byte body)
```
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
PHP get the parameters that are put after the question mark in ...
The $_GET array is an array with all the arguments passed in the URL. You can use $_GET['param1']; to get the value of...
Read more >Query string - Wikipedia
A query string is a part of a uniform resource locator (URL) that assigns values to specified parameters. A query string commonly includes...
Read more >Hypertext Transfer Protocol -- HTTP/1.0 - W3C
A client establishes a connection with a server and sends a request to the server in the form of a request method, URI,...
Read more >Why shouldn't a GET request change data on the server?
If I make a php service which inserts data in the database, and pass it parameters in the GET query string, why is...
Read more >RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the issue. The code we have was only evaluating template variables on a query string when they are present in the query parameter value part of the expression. We were not accounting for expressions that occur in the query parameter name portion, which is how query expressions presented in this issue get processed. This is due to the fact that we expect
name=value
pairs on a query string when parsing.I will work on a fix and present a PR shortly.
@kdavisk6 i use this example but get an error:
i try next scenarios but get same error:
Here is my API:
my feignBuilder:
Log: