public class HttpServiceImpl extends Object implements HttpService
Constructor and Description |
---|
HttpServiceImpl() |
public String get(String url) throws HttpServiceException, TechnicalException
get
in interface HttpService
url
- is full urlHttpServiceException
- is thrown if you have a technical error (IOException on GET) in NoraUi.TechnicalException
- is thrown if you have a technical error (get wrong message) in NoraUi.public String get(String baseUrl, String uri) throws HttpServiceException, TechnicalException
get
in interface HttpService
baseUrl
- beginning of the urluri
- end of the urlHttpServiceException
- is thrown if you have a technical error (IOException on GET) in NoraUi.TechnicalException
- is thrown if you have a technical error (get wrong message) in NoraUi.public String post(String url, String json) throws HttpServiceException, TechnicalException
post
in interface HttpService
url
- is full urljson
- body stringHttpServiceException
- is thrown if you have a technical error (IOException on POST) in NoraUi.TechnicalException
- is thrown if you have a technical error (get wrong message) in NoraUi.public String post(String baseUrl, String uri, String json) throws HttpServiceException, TechnicalException
post
in interface HttpService
baseUrl
- beginning of the urluri
- end of the urljson
- body stringHttpServiceException
- is thrown if you have a technical error (IOException on POST) in NoraUi.TechnicalException
- is thrown if you have a technical error (get wrong message) in NoraUi.protected okhttp3.OkHttpClient getClient()
Copyright © 2023 NoraUi. All rights reserved.