i am playing with curl and i get a response from the following servers just fine when i enter into curl
"curl [url]/rest/api/2/field -k"
https://hibernate.atlassian.net/rest/api/2/search
https://issues.sonatype.org/rest/api/2/search
https://jira.springsource.org/rest/api/2/search
https://issues.apache.org/jira/rest/api/2/search
https://jira.atlassian.com/rest/api/2/search
but when i try to get a response from https://jira.secondlife.com/rest/api/2/field. All i get is an empty response. I entered a rubbish url such as https://jira.secondlife.com/refgfdfdpo/field and it still returns an empty response like its blocking my requests. But the weird thing is that when i use google chrome and enter the url i get a valid json repsonse so i dont understand why curl cant give me a response when chrome can.
Community moderators have prevented the ability to post new answers.
It's probably because jira.secondlife.com have disallowed anonymous browsing (at a guess) - try https://jira.secondlife.com/rest/api/2/serverInfo and see what you get.
If you still get nothing back then it's probably due to some redirect that you're not following so try curl with the -L switch to follow redirects.
i cannot see any fields that show if anonymous users are allowed. I guess i could just work around it by checking if the serverInfo returns an empty body, thus assuming anonymous users are not allowed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any difference when you pass the authentication in CURL?
curl -u username:password https://jira.secondlife.com/rest/api/2/field
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i dont actually have a credential to secondlife's jira account. I just wanted to access it anonymously or find out if i can if it doesnt allow that.
Or did you mean actually typing in "username:password" for credentials because that didnt work either.
if i send a request with my basic header set to "username:password" or no basic header at all i get an empty body with 302 status code.
if i send a request with a empty basic header ":" i get a 200 with no body.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.