Skip to content

Malformed URL error occurred Accessing a URL protocol that was not enabled #66

@atopx

Description

@atopx

full error

Malformed URL error occurred Accessing a URL protocol that was not enabled. 
The URL protocol http is supported but not enabled by default. 
It must be enabled by adding the --enable-url-protocols=http option to the native-image command.

execution environment

device: Apple M1 Pro
rust: 1.89.0
extractous: 0.3.0

execution code

fn main() {
    let extractor = extractous::Extractor::new();

    let test_url = "http://10.41.0.7:9007/uploads/test.pdf";
    let result = extractor.extract_url_to_string(test_url);
    match result {
        Ok((result, meta)) => {
            println!("result:: {result}");
            println!("meta:: {meta:?}");
        }
        Err(e) => {
            eprintln!("failed:: {e}")
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions