Closed ssokolov1 closed 2 years ago
Do you mind post your delete request? I can not reproduce it with following request.
### delete test
// @name delete-demo
DELETE https://httpbin.org/delete
Well, it is hard as service is behind corporate firewall. Only what I can help is to say that response status is 204 - no content. Empty body
`DELETE http://localhost:8080/nuxeo/api/v1/path/RetentionRules
Status: 204
X-Frame-Options : SAMEORIGIN
Referrer-Policy : strict-origin-when-cross-origin
X-UA-Compatible : IE=10; IE=11
Cache-Control : no-cache
X-Content-Type-Options : nosniff
Content-Security-Policy : img-src data: blob: ; default-src blob: ; script-src 'unsafe-inline' 'unsafe-eval' data: ; style-src 'unsafe-inline' ; font-src data: *
X-XSS-Protection : 1; mode=block
Content-Type : application/json
Date : Mon, 29 Aug 2022 11:55:08 GMT
2022-08-29 11:55:09.121 ERROR 2946 --- [ main] org.mvnsearch.http.HttpxCommand : HTX-002-500 - Failed to parse http code!
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:208) ~[na:na]
at java.util.ImmutableCollections$List12.
I have similar crashes on 401 responses.
❯ httpx -f src/test/http/devices-auth.http
POST http://localhost:9090/device/auth/test-ABC-123-XYZ-001
Status: 401 Unauthorized
Content-Type : application/json
www-authenticate : Bearer
content-length : 0
2022-10-09 11:58:13.090 ERROR 46815 --- [ main] org.mvnsearch.http.HttpxCommand : HTX-002-500 - Failed to parse http code!
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:208) ~[na:na]
at java.util.ImmutableCollections$List12.<init>(ImmutableCollections.java:556) ~[na:na]
at java.util.List.of(List.java:812) ~[httpx:na]
at org.mvnsearch.http.protocol.HttpBaseExecutor.request(HttpBaseExecutor.java:110) ~[httpx:0.35.1]
at org.mvnsearch.http.protocol.HttpExecutor.execute(HttpExecutor.java:43) ~[httpx:0.35.1]
at org.mvnsearch.http.HttpxCommand.execute(HttpxCommand.java:345) ~[httpx:0.35.1]
at org.mvnsearch.http.HttpxCommand.call(HttpxCommand.java:238) ~[httpx:0.35.1]
at org.mvnsearch.http.HttpxCommand.call(HttpxCommand.java:34) ~[httpx:0.35.1]
at picocli.CommandLine.executeUserObject(CommandLine.java:1953) ~[httpx:4.6.3]
at picocli.CommandLine.access$1300(CommandLine.java:145) ~[httpx:4.6.3]
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) ~[na:na]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) ~[na:na]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) ~[na:na]
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) ~[httpx:4.6.3]
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) ~[na:na]
at picocli.CommandLine.execute(CommandLine.java:2078) ~[httpx:4.6.3]
at org.mvnsearch.http.HttpFileRunner.run(HttpFileRunner.java:24) ~[httpx:0.35.1]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771) ~[httpx:2.7.2]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755) ~[httpx:2.7.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[httpx:2.7.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[httpx:2.7.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[httpx:2.7.2]
at org.mvnsearch.http.HttpxApplication.main(HttpxApplication.java:23) ~[httpx:0.35.1]
@apatrida @ssokolov1 guys, I'm sorry about this bug, and it's caused by NPE List.of(bytes)
. Please update to version 0.35.2
NPE issue is fixed. Thank you very much !!! However, sorry to say, there is a new one. That is about destination of saved files. I am running a command in testing directory where file test-api-retention.http is located and there is a subfolder resources
httpx -f rest-api-retention.http -p docker -a
### Download random logo to use as attachment to the file
GET {{logo}}
>>! resources/logo.png
2022-10-10 11:04:07.103 ERROR 29167 --- [ main] org.mvnsearch.http.HttpxCommand : HTX-002-500 - Failed to parse http code!
java.nio.file.FileSystemException: rest-api-retention.http/resources/logo.png: Not a directory at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[httpx:na]
Here is the problem. It is trying to append script name to the current path, what is wrong in my opinion as rest-api-retention.http is a file, not a directory. IntelliJ internal runner handles it correctly. I can create a new issue if it helps. And one more time, thank you for your great work.
probably best to report new bug under new issue.
@ssokolov1 I created an issue for your question. #16
Response body is empty that why I guess. But should not fail. It is a legit case. Thank you one more time for excellent tool.