FAQ
Hi

I have a URL (say http://localhost:8080/a=1&b=2).Now, i want the values of
variables present in the URL.Seems to be easy, but i tried and couldnt get
it.Please help me out with this

Thanking You

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Chris dollin at Oct 29, 2014 at 9:10 am

    On 29 October 2014 09:02, jagadeesh mn wrote:

    I have a URL (say http://localhost:8080/a=1&b=2).Now, i want the values of
    variables present in the URL.Seems to be easy, but i tried and couldnt get
    it.Please help me out with this
    What did you try? Specifcally?

    (If you used that URL, there are no query variables in it,
    because there should be a `?` before the `a=`.)

    Chris

    --
    Chris "allusive" Dollin

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jagadeesh mn at Oct 29, 2014 at 9:13 am
    Sorry Chris, it was a typo.There is '?' before 'a'
    On Wednesday, October 29, 2014 2:40:44 PM UTC+5:30, ehedgehog wrote:

    On 29 October 2014 09:02, jagadeesh mn <jagadees...@gmail.com
    <javascript:>> wrote:
    I have a URL (say http://localhost:8080/a=1&b=2).Now, i want the values of
    variables present in the URL.Seems to be easy, but i tried and couldnt get
    it.Please help me out with this
    What did you try? Specifcally?

    (If you used that URL, there are no query variables in it,
    because there should be a `?` before the `a=`.)

    Chris

    --
    Chris "allusive" Dollin
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Chris dollin at Oct 29, 2014 at 9:38 am

    On 29 October 2014 09:12, jagadeesh mn wrote:
    Sorry Chris, it was a typo.There is '?' before 'a'
    So what did you try? Specifically?

    [I did something using net/url but it's not accessible from
      here.]

    Chris

    --
    Chris "allusive" Dollin

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Stefan Scholl at Oct 29, 2014 at 9:41 am
    See this example:
    http://golang.org/pkg/net/url/#example_URL

    Instead of q.Set(...) you can call q.Get("a") to get "a".


    See Values example: http://golang.org/pkg/net/url/#example_Values


    jagadeesh mn wrote:
    Sorry Chris, it was a typo.There is '?' before 'a'
    On Wednesday, October 29, 2014 2:40:44 PM UTC+5:30, ehedgehog wrote:

    On 29 October 2014 09:02, jagadeesh mn <jagadees...@gmail.com
    <javascript:>> wrote:
    I have a URL (say http://localhost:8080/a=1&b=2).Now, i want the values of
    variables present in the URL.Seems to be easy, but i tried and couldnt get
    it.Please help me out with this
    What did you try? Specifcally?

    (If you used that URL, there are no query variables in it,
    because there should be a `?` before the `a=`.)

    Chris

    --
    Chris "allusive" Dollin
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jagadeesh mn at Oct 29, 2014 at 9:58 am
    It worked..Thanks :)
    On Wednesday, October 29, 2014 3:11:20 PM UTC+5:30, Stefan Scholl wrote:

    See this example:
    http://golang.org/pkg/net/url/#example_URL

    Instead of q.Set(...) you can call q.Get("a") to get "a".


    See Values example: http://golang.org/pkg/net/url/#example_Values


    jagadeesh mn <jagadees...@gmail.com <javascript:>> wrote:
    Sorry Chris, it was a typo.There is '?' before 'a'
    On Wednesday, October 29, 2014 2:40:44 PM UTC+5:30, ehedgehog wrote:

    On 29 October 2014 09:02, jagadeesh mn <jagadees...@gmail.com
    <javascript:>> wrote:
    I have a URL (say http://localhost:8080/a=1&b=2).Now, i want the
    values
    of
    variables present in the URL.Seems to be easy, but i tried and
    couldnt
    get
    it.Please help me out with this
    What did you try? Specifcally?

    (If you used that URL, there are no query variables in it,
    because there should be a `?` before the `a=`.)

    Chris

    --
    Chris "allusive" Dollin
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 29, '14 at 9:02a
activeOct 29, '14 at 9:58a
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase