Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ip query for getting resolved response IP #3106

Open
jcamiel opened this issue Aug 1, 2024 · 0 comments
Open

Support ip query for getting resolved response IP #3106

jcamiel opened this issue Aug 1, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Aug 1, 2024

A proposal to add an ip query

GET https://foo.com
HTTP 200
[Asserts]
ip == "192.168.0.1"
GET https://foo.com
HTTP 200
[Asserts]
ip matches /2001:0000:130F:0000:0000:09C0:876A:\d*/

In libcurl the corresponding call is CURLINFO_PRIMARY_IP.

There is also a CURLINFO_LOCAL_IP but I've the impression that user expectation is more on primary ip.

Question: what's about port ? Does the query ip exctract the IP address and the port (192.168.0.01:8080), or do we have a separate port query that we can do latter?

GET https://foo.com
HTTP 200
[Asserts]
ip == "192.168.0.1"
port == 8080

With ip/portas separated queries, we can also have isIPv6 and isIPv4 predicates:

GET https://foo.com
HTTP 200
[Asserts]
ip isIPv6

Idea from @lepapareil 😎

@jcamiel jcamiel added the enhancement New feature or request label Aug 1, 2024
@jcamiel jcamiel added the good first issue Good for newcomers label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant