Skip to content

Conversation

@theory
Copy link
Owner

@theory theory commented Aug 30, 2025

Simple only handles GET and POST requests, unfortunately, so skip it and use Easy directly. Add a new method, _curl, that creates an Easy with everything properly configured, including a custom user agent, basic auth headers, other headers, the request body, and CA validation. It returns the object and references to scalars into which the headers and content will be populated when it executes.

Revamp the t/demo.t to do basic validation that the method works, then add t/request.t to do live testing of its functionality. Have it rely on an environment variable for the base URL it tests against, and load the go-httpbin service for local, reliable testing. For whatever reason it returns 100 for requests with a body while httpbingo.org returns 200, so the test accepts either response code.

`Simple` only handles GET and POST requests, unfortunately, so skip it
and use `Easy` directly. Add a new method, `_curl`, that creates an
`Easy` with everything properly configured, including a custom user
agent, basic auth headers, other headers, the request body, and CA
validation. It returns the object and references to scalars into which
the headers and content will be populated when it executes.

Revamp the `t/demo.t` to do basic validation that the method works, then
add `t/request.t` to do live testing of its functionality. Have it rely
on an environment variable for the base URL it tests against, and load
the `go-httpbin` service for local, reliable testing. For whatever
reason it returns 100 for requests with a body while httpbingo.org
returns 200, so the test accepts either response code.
@theory theory self-assigned this Aug 30, 2025
@theory theory added bug Something isn't working enhancement New feature or request labels Aug 30, 2025
@theory theory merged commit d28db1f into main Aug 30, 2025
4 checks passed
@theory theory deleted the www-curl branch August 30, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants