Host Parsing #33
Unanswered
PorterHoskins
asked this question in
Q&A
Replies: 1 comment
-
I just ran into the same issue today, I found a workaround that works for at least my case so I thought I would share. We needed to set different server codes depending on the host. As you are aware, we can't parse a host similar to how we would parse a Path for example. So you kind of want to invert the setup to parse this. I have an enum
I then added an extension to this
This is now usable like so
I know this discussion was posted a long time ago, but hope this helps someone! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes parsing the host value is needed when working with multiple server environments or distributed enterprise systems. The urls that I need to parse are as follows:
Parsing the server value in the host is needed to understand which server I should be pointing my url requests at. Currently I don't believe there is a way to run a parser on the host value of a
URLRequestData
. TheHost
parser requires a static string for the entire host.Is there a way I am not thinking about to run a parser on the host without getting the
.host
off theURLRequestData
and running it through its own parser?Beta Was this translation helpful? Give feedback.
All reactions