ProspectOne / perfops-cli

A simple command line tool to interact with hundreds of servers around the world.
https://perfops.net/cli
287 stars 45 forks source link

perfops curl does not support Content-Type: text/plain;charset=UTF-8 #38

Open julienlau opened 5 years ago

julienlau commented 5 years ago

Hi, I really appreciate the tool, but I think the content-type is hard coded as :
Content-Type: application/json Which makes my api return 404 instead of 200 if for example I serve only plain text. Thanks and regards

jimaek commented 5 years ago

Hey, are you sure about this? We use regular curl in the backend with default settings

julienlau commented 5 years ago

Hi,

Thanks for quick answer. No I am not sure, but I cannot understand why I get this behaviour:


curl -v https://prd-gra-ladon.x.com/foo/bar


perfops curl -v https://prd-gra-ladon.x.com/foo/bar Node281, AS46562, Phoenix, United States perfops: No output from the server. Try the -I parameter.\n


perfops curl -I -v https://prd-gra-ladon.x.com/foo/bar Node241, AS40676, Ashburn, United States HTTP/1.1 404 Not Found Date: Wed, 28 Nov 2018 12:53:43 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Server: kong/1.0.0rc3 Content-Length: 58

jimaek commented 5 years ago

Is that domain supposed to be working? I am getting a DNS error when trying to open it. It cant resolve the domain

julienlau commented 5 years ago

Sorry no, it is not a public domain. I can PM it to you, but I won't keep it running for very long. It is a server running: docker run -ti --rm -p 5050:5050 vad1mo/hello-world-rest

jimaek commented 5 years ago

Ok, we will run our tests to debug this. Currently I can't see the problem but I will have my team to check as well.