You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl: (18) transfer closed with 16 bytes remaining to read
However, if I don't send a body to the endpoint, I get a 402 as expected:
% curl -X POST -k --http1.1 https://localhost:8081/hello
payment required
FWIW, I am able to dump the request details right before the call to sendDirectResponse in the handlePaymentRequired method, and I can see the body I'm expecting.
Forgot to mention that when I try the same request in Postman, I get Error: aborted. Trying it in the JetBrains HTTP client, I get org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 20; received: 17)
Hey. Thanks for the report. Looks like this was caused by the request headers being blindly copied when sending the L402 challenge header. Created a quick PR here: #114. Will need to make sure nothing else breaks with that, but it should fix your issue.
I have a very simple web service running locally. It has a POST endpoint at
/hello
that accepts a JSON body of the formand it responds with a body like
When I try using Aperture to proxy the request, I get an error. Here is the curl command I'm using
and the error I get is
However, if I don't send a body to the endpoint, I get a 402 as expected:
FWIW, I am able to dump the request details right before the call to
sendDirectResponse
in thehandlePaymentRequired
method, and I can see the body I'm expecting.Am I missing something in my request?
The text was updated successfully, but these errors were encountered: