FAQ
Hi there,

I just wanted to share with you a new library we've just launched with a
friend of mine. If you need to perform several HTTP requests and handle
errors and timeouts quite simple, give GoReq a try.

https://github.com/franela/goreq


Comments and suggestions are well appreciated.

Best,

Marcos.

--
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.

Search Discussions

  • Jesse McNelis at Nov 1, 2013 at 3:10 am

    On Fri, Nov 1, 2013 at 1:54 PM, wrote:

    Hi there,

    I just wanted to share with you a new library we've just launched with a
    friend of mine. If you need to perform several HTTP requests and handle
    errors and timeouts quite simple, give GoReq a try.

    https://github.com/franela/goreq


    Comments and suggestions are well appreciated.
    The convention with error returns is generally to return a value of the
    built-in 'error' interface and have the caller type assert it to a specific
    error type to get additional functionality.
    This leaves your API open to return different kinds of errors or more
    specific errors in the future.

    --
    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.
  • Marcosnils at Nov 1, 2013 at 3:14 am
    Hi Jesse,

    Thanks for your comment. We're actually returning the same error types
    Golang net library returns.

    We're not doing any kind of error wrapping or something similar here. Is
    this what you were referring to?

    Thanks,

    Marcos.

    El viernes, 1 de noviembre de 2013 00:10:23 UTC-3, Jesse McNelis escribió:
    On Fri, Nov 1, 2013 at 1:54 PM, <marco...@gmail.com <javascript:>> wrote:

    Hi there,

    I just wanted to share with you a new library we've just launched with a
    friend of mine. If you need to perform several HTTP requests and handle
    errors and timeouts quite simple, give GoReq a try.

    https://github.com/franela/goreq


    Comments and suggestions are well appreciated.
    The convention with error returns is generally to return a value of the
    built-in 'error' interface and have the caller type assert it to a specific
    error type to get additional functionality.
    This leaves your API open to return different kinds of errors or more
    specific errors in the future.
    --
    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.
  • Jesse McNelis at Nov 1, 2013 at 4:09 am

    On Fri, Nov 1, 2013 at 2:14 PM, wrote:

    Hi Jesse,

    Thanks for your comment. We're actually returning the same error types
    Golang net library returns.
    We're not doing any kind of error wrapping or something similar here. Is
    this what you were referring to?
    I mean,
    func (r Request) Do() (*Response, *Error)
    should be,
    func (r Request) Do() (*Response, error)

    If you look at the net pkg in the standard library all the functions return
    'error' but can be asserted to specific error types like *net.OpError.

    One of the reasons this is important is that people will do:
    func someFunc() error {
         _, err := goreq.Request{ Method: "POST", Uri: "http://www.google.com"
    }.Do()
         return err
    }
    and the return of someFunc() will be a non-nil 'error' value containing
    possibly a nil *goreq.Error.
    http://golang.org/doc/faq#nil_error




    --
    =====================
    http://jessta.id.au

    --
    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.
  • Marcos Lilljedahl at Nov 1, 2013 at 4:42 am
    Jesse,

    I see what you're saying now. Code has been improved per your observations.

    Thanks!.

    Marcos.

    --
    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.
  • Marcosnils at Apr 3, 2014 at 8:46 pm
    Hi there,

    Just passing by to let you know that GoReq now supports insecure https
    requests and some bug fixes.

    Comments and suggestions are always welcome.

    Marcos.

    El viernes, 1 de noviembre de 2013 01:42:24 UTC-3, Marcos Lilljedahl
    escribió:
    Jesse,

    I see what you're saying now. Code has been improved per your observations.

    Thanks!.

    Marcos.
    --
    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.
  • Marcos Lilljedahl at Jul 25, 2014 at 2:44 am
    Hi there,

    Some updates about goreq:

    1) Suppor for compressed request and responses (Gzip and Defilate)

    2) Add proxy support (both through env variables and explicit declaration
    per request)

    Cheers!.

    El jueves, 3 de abril de 2014 13:45:59 UTC-7, marco...@gmail.com escribió:
    Hi there,

    Just passing by to let you know that GoReq now supports insecure https
    requests and some bug fixes.

    Comments and suggestions are always welcome.

    Marcos.

    El viernes, 1 de noviembre de 2013 01:42:24 UTC-3, Marcos Lilljedahl
    escribió:
    Jesse,

    I see what you're saying now. Code has been improved per your
    observations.

    Thanks!.

    Marcos.
    --
    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
postedNov 1, '13 at 2:54a
activeJul 25, '14 at 2:44a
posts7
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase