Request: In case of CLI method should be CLI too.#194
Open
janbarasek wants to merge 2 commits into
Open
Conversation
Member
|
HTTP method CLI doesn't exist. |
Contributor
Author
|
I don't know how to better represent this (if at all). When obtaining the current Request from the DI, it should be possible to verify that the Request was created artificially in CLI mode and is not a real request. In that case, I can't rely on a number of things, such as URLs. What do you think? |
Member
|
In a strict way - an HTTP request can be automatically created only via HTTP protocol so exception is more accurate. In practice - I'm not sure. |
dg
force-pushed
the
master
branch
10 times, most recently
from
March 4, 2021 20:04
5ace0ce to
3affe3a
Compare
dg
force-pushed
the
master
branch
4 times, most recently
from
April 27, 2021 21:33
6ee31b8 to
4f4a403
Compare
dg
force-pushed
the
master
branch
4 times, most recently
from
August 25, 2021 15:26
a8895b6 to
9409a5f
Compare
dg
force-pushed
the
master
branch
5 times, most recently
from
September 3, 2021 22:02
7b7f9ff to
78bee95
Compare
dg
force-pushed
the
master
branch
5 times, most recently
from
November 29, 2021 19:05
70207e3 to
d3f0e03
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
December 12, 2021 17:37
0e9377a to
04224e7
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
October 13, 2022 01:29
59f402a to
32af756
Compare
dg
force-pushed
the
master
branch
12 times, most recently
from
November 30, 2022 17:29
ba7eba8 to
7774190
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
December 5, 2022 00:09
c6e0524 to
788ddc4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the case of obtaining a service for an Http Request in CLI mode, it does not make sense for the call method to be GET when no request exists.
I think Request should either throw an exception that cannot be used in a CLI context, or it should return a special CLI method.
Current behavior looks illogical:
Thanks.