@@ -0,0 +1,1746 @@
+/*%0A * Copyright 2015-2021 Danilo Reinert%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.reinert.requestor.net;%0A%0Aimport java.io.UnsupportedEncodingException;%0A%0Aimport io.reinert.requestor.core.Requestor;%0Aimport io.reinert.requestor.core.auth.BasicAuth;%0A%0A/**%0A * This class provides a static initializer for Requestor's deferred bindings for JVM environment.%0A *%0A * @author Danilo Reinert%0A */%0Apublic class RequestorNet %7B%0A%0A    /**%0A     * Initializes static lazy bindings to proper usage of Requestor in GWT environment.%0A     * %3Cp%3E%3C/p%3E%0A     * Call this method in a static block in the app's EntryPoint.%0A     */%0A    public static void init() %7B%0A        if (!Requestor.isInitialized()) %7B%0A            Requestor.init(%0A                    new BasicAuth.Base64() %7B%0A                        public String encode(String text) %7B%0A                            try %7B%0A                                return Base64.encodeBase64String(text.getBytes(%22UTF-8%22));%0A                            %7D catch (UnsupportedEncodingException e) %7B%0A                                throw new RuntimeException(%22Given string is not in UTF-8 format.%22, e);%0A                            %7D%0A                        %7D%0A                    %7D%0A            );%0A        %7D%0A    %7D%0A%7D%0A

Create RequestorNet