KivaKit Parçacığı #7

Jan 03 2023
KivaKit hakkında daha fazla bilgi https://state-of-the-art.org/https://www.
kod

package com.telenav.kivakit.snippets;

import com.telenav.kivakit.core.language.trait.TryTrait;

import static com.telenav.kivakit.network.http.secure.SecureHttpNetworkLocation.secureHttpNetworkLocation;

public class Snippet7 extends BaseSnippet implements TryTrait
{
    public static void main(String[] args)
    {
        new Snippet7().run();
    }

    @Override
    protected Object onSnippet()
    {
        return secureHttpNetworkLocation("https://raw.githubusercontent.com/Telenav/kivakit/releases/kivakit-network/http/src/main/java/com/telenav/kivakit/network/http/HttpMethod.java")
            .get()
            .readText();
    }
}

      
                
Output
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // © 2011-2021 Telenav, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package com.telenav.kivakit.network.http; import com.telenav.kivakit.annotations.code.quality.CodeQuality; import com.telenav.kivakit.core.messaging.Listener; import static com.telenav.kivakit.annotations.code.quality.Stability.STABLE_EXTENSIBLE; import static com.telenav.kivakit.annotations.code.quality.Documentation.DOCUMENTATION_COMPLETE; import static com.telenav.kivakit.annotations.code.quality.Testing.UNTESTED; /** * @author jonathanl (shibo) */ @CodeQuality(stability = STABLE_EXTENSIBLE, testing = UNTESTED, documentation = DOCUMENTATION_COMPLETE) public enum HttpMethod { GET, POST, DELETE, HEAD, PUT, CONNECT, OPTIONS, TRACE, PATCH, NULL_HTTP_METHOD; /** * Returns the {@link HttpMethod} for the given text * * @param listener The listener to notify with any problems * @param text The text to parse */ public static HttpMethod parseHttpMethod(Listener listener, String text) { try { return valueOf(text.toUpperCase()); } catch (Exception e) { listener.problem("Invalid HTTP method: $", text); return null; } } }

KivaKit hakkında daha fazla bilgi

https://state-of-the-art.org/
https://www.kivakit.org/

İlgili Makaleler

KivaKit Parçacığı #1
KivaKit Parçacığı #2
KivaKit Parçacığı #3

Gördüğünüz Çoğu Java'nın Gerçek Java Olmamasının Altı Nedeni
Neden Bir Ana Bilgisayar Bir Dizge Değildir ve Bir Bağlantı Noktası
Bir Tam Sayı Değildir Bir Tam Sayı Bir Sayı Değildir
Her Şey Böl ve Yönet