Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Exception Trace: java.net.MalformedURLException: no protocol: null #165

Closed
rayohan opened this issue May 3, 2018 · 1 comment
Closed

Comments

@rayohan
Copy link

rayohan commented May 3, 2018

Hi!

I use scalaj to do a http-request, works well but in some times i recive this issue.

Exception Trace: java.net.MalformedURLException: no protocol: null
at java.net.URL.(URL.java:593)
at java.net.URL.(URL.java:490)
at java.net.URL.(URL.java:439)
at scalaj.http.HttpRequest.exec(Http.scala:335)
at scalaj.http.HttpRequest.asString(Http.scala:455)
at
****.scala:859)

The line of the error is in the part of the http-response, the url is https protocol.

resp = Http(url)
.method("get")
.cookies(cookies)
.headers(Seq(("Accept", "Application/json"),
("Content-Type", "Application/json")
))
.asString

@rayohan rayohan closed this as completed May 4, 2018
@rayohan rayohan reopened this May 4, 2018
@rayohan
Copy link
Author

rayohan commented May 4, 2018

I follow the error and the url that i passed to the response was empty, so i think it couldn't search the protocol for this.

Close this when you can, thanks

@rayohan rayohan closed this as completed May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant