Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow REST request to plain http servers #3

Open
luisfcorreia opened this issue Sep 1, 2013 · 5 comments
Open

Allow REST request to plain http servers #3

luisfcorreia opened this issue Sep 1, 2013 · 5 comments

Comments

@luisfcorreia
Copy link

A good fix would be allowing "useSsl" in RestRequest to be public instead of only private.

I had to change the default to false in order to make it work for me.

@manavo
Copy link
Owner

manavo commented Sep 1, 2013

It is private, but you can set it via the setSsl method in RestRequest. Or did you want to read it's current value?

@luisfcorreia
Copy link
Author

I'm just creating a class that extends RestAPI. that method is not exposed there.

It is very likely that I'm doing this the wrong way.
(it wouldn't be the first time)

@manavo
Copy link
Owner

manavo commented Sep 1, 2013

Well, I'd say one of 2 things:

  1. Make a "getter", so just like setSsl, you can have getSsl, which gives you the value.
  2. Make it protected. If you want it accessible from the extending class, you'll be able to read/write the value.

@luisfcorreia
Copy link
Author

Could be fixed by adding this to RestApi.java

public void setSSL(Boolean ssl) {
    this.rest.setSsl(ssl);
}

@manavo
Copy link
Owner

manavo commented Sep 1, 2013

Ah, sorry! Misread which class you're extending!

Yes, that would allow you to set it after instantiating the class. I usually set it in the constructor of my class which extends RestApi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants