[erlang-questions] Having trouble with httpc
Samuel Barney
samjbarney@REDACTED
Tue Sep 15 19:14:07 CEST 2015
Eshell V7.0.3 (abort with ^G)
1> inets:start().
ok
2> ssl:start().
ok
3> httpc:request("http://ingeniuxtest.byui.edu/d92/x107221.xml").
{error,no_scheme}
On Tue, Sep 15, 2015 at 10:59 AM, Drew Varner <drew.varner@REDACTED>
wrote:
> Can you share an example?
>
> —snip--
> Eshell V7.0 (abort with ^G)
> 1> inets:start().
> ok
> 2> ssl:start().
> ok
> 3> httpc:request("
> https://raw.githubusercontent.com/processone/ejabberd/6a9c9616d04003d73a7ce2916ee03c997f66bc1d/examples/transport-configs/configs/aim-transport.xml
> ").
> —end snip —
>
> Works for me.
>
> > On Sep 15, 2015, at 6:53 PM, Samuel Barney <samjbarney@REDACTED> wrote:
> >
> > To clarify, is there a way for me to access a url that ends with '.xml'
> >
> > On Tue, Sep 15, 2015 at 10:52 AM, Samuel Barney <samjbarney@REDACTED>
> wrote:
> > I just tried hitting a different page, and it worked just fine. I do
> have the http://, but I think the error is that the url ends in '.xml'.
> Is there a way to get around that?
> >
> > Respectfully,
> > Samuel Barney
> >
> > On Tue, Sep 15, 2015 at 10:48 AM, Drew Varner <drew.varner@REDACTED>
> wrote:
> > Samuel,
> >
> > You need to make sure you have a compete URI, for example “
> http://www.google.com”.
> >
> > It looks like you forget the “http://“ portion.
> >
> > See
> https://github.com/erlang/otp/blob/a2670f0822fc6729df956c8ec8c381340ff0a5fb/lib/inets/src/http_lib/http_uri.erl#L137-L139
> >
> > Cheers,
> > Drew
> >
> >> On Sep 15, 2015, at 6:43 PM, Samuel Barney <samjbarney@REDACTED>
> wrote:
> >>
> >> I'm trying to use httpc:request/1, but every single time I call it I
> get a no_scheme error. I've started inets, and all of the examples I've
> found say I am doing it correctly. Has anyone had this error before, and
> how did you resolve it?
> >>
> >> Respectfully,
> >> Samuel Barney
> >> _______________________________________________
> >> erlang-questions mailing list
> >> erlang-questions@REDACTED
> >> http://erlang.org/mailman/listinfo/erlang-questions
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150915/43146c9b/attachment.htm>
More information about the erlang-questions
mailing list