FAQ
I'm looking for a Go package that could just talk to HTTP APIs, receive a
JSON response and then convert that response into a map[string]interface{}
so I could use it easily.

I would like a simple solution like
http://rubydoc.info/gems/rest-client/1.6.7/frames. I found gorest but
gorest is a server framework and that's not really what I'm looking for.

Does anyone knows a powerful high level HTTP API client?

I would gladly code my own http.Client wrapper but I think that if there's
an existing package that satisfies my need I'd rather contribute.

Thanks,

José Carlos

--

Search Discussions

  • Scott Turnbull at Dec 2, 2012 at 12:34 am
    Haven't used it but you could try

    http://code.google.com/p/gorest/source/browse/ - looks to be a good set of
    featured code and includes a client library.
    On Friday, November 30, 2012 7:41:59 PM UTC-5, José Carlos Nieto wrote:

    I'm looking for a Go package that could just talk to HTTP APIs, receive a
    JSON response and then convert that response into a map[string]interface{}
    so I could use it easily.

    I would like a simple solution like
    http://rubydoc.info/gems/rest-client/1.6.7/frames. I found gorest but
    gorest is a server framework and that's not really what I'm looking for.

    Does anyone knows a powerful high level HTTP API client?

    I would gladly code my own http.Client wrapper but I think that if there's
    an existing package that satisfies my need I'd rather contribute.

    Thanks,

    José Carlos
    --
  • Alain Brown at Feb 25, 2013 at 12:20 am
    Have you tried the "net/http" package? http://golang.org/pkg/net/http/

    The standard package has enough for me. And you can use the "encoding/json"
    package for JSON unmarshalling.

    http://golang.org/pkg/encoding/json/#example_Unmarshal

    Pretty straight forward to execute a get or post on a URL,

    resp, err := http.Get("http://example.com/")
    ...
    resp, err := http.Post("http://example.com/upload", "image/jpeg", &buf)

      return a byte[] and unmarshall it into whatever type you like:

    type Animal struct {
    Name string
    Order string
    }
    var animals []Animal
    err := json.Unmarshal(resp, &animals)

      I suppose in your case a map. I don't think its going to get much simpler
    than that :-). Happy coding
    On Friday, November 30, 2012 7:41:59 PM UTC-5, José Carlos Nieto wrote:

    I'm looking for a Go package that could just talk to HTTP APIs, receive a
    JSON response and then convert that response into a map[string]interface{}
    so I could use it easily.

    I would like a simple solution like
    http://rubydoc.info/gems/rest-client/1.6.7/frames. I found gorest but
    gorest is a server framework and that's not really what I'm looking for.

    Does anyone knows a powerful high level HTTP API client?

    I would gladly code my own http.Client wrapper but I think that if there's
    an existing package that satisfies my need I'd rather contribute.

    Thanks,

    José Carlos
    --
    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/groups/opt_out.
  • Jason McVetta at Mar 20, 2013 at 2:53 am
    FWIW you might check out my restclient package:
    https://github.com/jmcvetta/restclient

    If you don't know the JSON response format you expect, you may be better
    off unmarshalling into map[string]json.RawMessage.


    On Fri, Nov 30, 2012 at 4:41 PM, José Carlos Nieto wrote:

    I'm looking for a Go package that could just talk to HTTP APIs, receive a
    JSON response and then convert that response into a map[string]interface{}
    so I could use it easily.

    I would like a simple solution like
    http://rubydoc.info/gems/rest-client/1.6.7/frames. I found gorest but
    gorest is a server framework and that's not really what I'm looking for.

    Does anyone knows a powerful high level HTTP API client?

    I would gladly code my own http.Client wrapper but I think that if there's
    an existing package that satisfies my need I'd rather contribute.

    Thanks,

    José Carlos

    --

    --
    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/groups/opt_out.
  • Pravin Mishra at Mar 15, 2014 at 6:22 pm
    Any update to this thread. I am looking for A simple HTTP and REST client
    for Go like rest-client <https://github.com/rest-client/rest-client>(ruby).
    On Saturday, 1 December 2012 06:11:59 UTC+5:30, José Carlos Nieto wrote:

    I'm looking for a Go package that could just talk to HTTP APIs, receive a
    JSON response and then convert that response into a map[string]interface{}
    so I could use it easily.

    I would like a simple solution like
    http://rubydoc.info/gems/rest-client/1.6.7/frames. I found gorest but
    gorest is a server framework and that's not really what I'm looking for.

    Does anyone knows a powerful high level HTTP API client?

    I would gladly code my own http.Client wrapper but I think that if there's
    an existing package that satisfies my need I'd rather contribute.

    Thanks,

    José Carlos
    --
    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.
  • Jeevanandam M. at Sep 16, 2015 at 4:32 am
    Simple HTTP and REST client for Go - https://github.com/go-resty/resty

    Kindly have a look and share your feedback.

    On Saturday, March 15, 2014 at 11:22:21 AM UTC-7, Pravin Mishra wrote:

    Any update to this thread. I am looking for A simple HTTP and REST client
    for Go like rest-client <https://github.com/rest-client/rest-client>
    (ruby).
    On Saturday, 1 December 2012 06:11:59 UTC+5:30, José Carlos Nieto wrote:

    I'm looking for a Go package that could just talk to HTTP APIs, receive a
    JSON response and then convert that response into a map[string]interface{}
    so I could use it easily.

    I would like a simple solution like
    http://rubydoc.info/gems/rest-client/1.6.7/frames. I found gorest but
    gorest is a server framework and that's not really what I'm looking for.

    Does anyone knows a powerful high level HTTP API client?

    I would gladly code my own http.Client wrapper but I think that if
    there's an existing package that satisfies my need I'd rather contribute.

    Thanks,

    José Carlos
    --
    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
postedDec 1, '12 at 12:42a
activeSep 16, '15 at 4:32a
posts6
users6
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase