Skip to content

display remote address in metadata#348

Merged
ducaale merged 1 commit into
ducaale:masterfrom
zuisong:display-remote-addr
Jan 17, 2024
Merged

display remote address in metadata#348
ducaale merged 1 commit into
ducaale:masterfrom
zuisong:display-remote-addr

Conversation

@zuisong
Copy link
Copy Markdown
Contributor

@zuisong zuisong commented Jan 17, 2024

implement proposal #347

example output

❯ cargo run -- httpbin.org/get -vv
   Compiling xh v0.20.1 (/Users/chen/mydata/xh)
    Finished dev [unoptimized + debuginfo] target(s) in 2.20s
     Running `/Users/chen/.rust-target/debug/xh httpbin.org/get -vv`
GET /get HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Host: httpbin.org
User-Agent: xh/0.20.1

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 295
Content-Type: application/json
Date: Wed, 17 Jan 2024 04:45:33 GMT
Server: gunicorn/19.9.0

{
    "args": {},
    "headers": {
        "Accept": "*/*",
        "Accept-Encoding": "gzip, deflate, br",
        "Host": "httpbin.org",
        "User-Agent": "xh/0.20.1",
        "X-Amzn-Trace-Id": "Root=1-65a75b6d-787ccc48646e40ce75195807"
    },
    "origin": "47.242.3.58",
    "url": "http://httpbin.org/get"
}



Elapsed time: 0.67198s
Remote address: 3.224.157.95:80

@zuisong zuisong changed the title display remote IP address in metadata display remote address in metadata Jan 17, 2024
Copy link
Copy Markdown
Owner

@ducaale ducaale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ducaale ducaale merged commit 7c7b1e0 into ducaale:master Jan 17, 2024
@zuisong zuisong deleted the display-remote-addr branch January 18, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants