Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def dl: (String => String) = { fileUrl: String => {
- val token = getToken();
- val response: HttpResponse[String] = Http(fileUrl)
- .header("Authorization", "Bearer " + token)
- .asString;
- try {
- retry(4){
- if (response.code != 200) {
- throw new javax.xml.ws.http.HTTPException(response.code)
- }
- response.body;
- }
- } catch {
- case e: javax.xml.ws.http.HTTPException => {
- println("error HTTPException " + e + fileUrl);
- "failed";
- }
- }
- }}
- spray.json.JsonParser$ParsingException: Unexpected character '<' at input index 0 (line 1, position 1), expected JSON Value: <html>?
- org.apache.spark.sql.functions.get_json_object
- DefaultJsonProtocol._
- scala.util.parsing.json._
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement