<commit_before><?php

namespace Laravel\Forge\Sites;

use Laravel\Forge\Contracts\ApplicationContract;
use Laravel\Forge\ApiResource;

class Site extends ApiResource
{
    /**
     * Resource type.
     *
     * @return string
     */
    public static function resourceType()
    {
        return 'site';
    }

    /**
     * Resource path (relative to Server URL).
     *
     * @return string
     */
    public function resourcePath()
    {
        return 'sites';
    }

    /**
     * Site domain.
     *
     * @return string
     */
    public function domain()
    {
        return $this->getData('name');
    }

    /**
     * Project type.
     *
     * @return string
     */
    public function projectType()
    {
        return $this->getData('project_type');
    }

    /**
     * Install new application on site.
     *
     * @param \Laravel\Forge\Contracts\ApplicationContract $application
     *
     * @return bool
     */
    public function install(ApplicationContract $application)
    {
        $this->getHttpClient()->request('POST', $this->apiUrl($application->type()), [
            'json' => $application->payload(),
        ]);

        return true;
    }

    /**
     * Uninstall application from site.
     *
     * @param \Laravel\Forge\Contracts\ApplicationContract $application
     *
     * @return bool
     */
    public function uninstall(ApplicationContract $application)
    {
        $this->getHttpClient()->request('DELETE', $this->apiUrl($application->type()));

        return true;
    }

    /**
     * Connect load balancer.
     *
     * @return bool
     */
    public function balance(array $serverIds)
    {
        $this->getHttpClient()->request('POST', $this->apiUrl('/balancing'), [
            'json' => $serverIds
        ]);

        return true;
    }
}<commit_msg>Updated HTTP for load balancing from POST to PUT verb to reflect server requirements<commit_after><?php

namespace Laravel\Forge\Sites;

use Laravel\Forge\Contracts\ApplicationContract;
use Laravel\Forge\ApiResource;

class Site extends ApiResource
{
    /**
     * Resource type.
     *
     * @return string
     */
    public static function resourceType()
    {
        return 'site';
    }

    /**
     * Resource path (relative to Server URL).
     *
     * @return string
     */
    public function resourcePath()
    {
        return 'sites';
    }

    /**
     * Site domain.
     *
     * @return string
     */
    public function domain()
    {
        return $this->getData('name');
    }

    /**
     * Project type.
     *
     * @return string
     */
    public function projectType()
    {
        return $this->getData('project_type');
    }

    /**
     * Install new application on site.
     *
     * @param \Laravel\Forge\Contracts\ApplicationContract $application
     *
     * @return bool
     */
    public function install(ApplicationContract $application)
    {
        $this->getHttpClient()->request('POST', $this->apiUrl($application->type()), [
            'json' => $application->payload(),
        ]);

        return true;
    }

    /**
     * Uninstall application from site.
     *
     * @param \Laravel\Forge\Contracts\ApplicationContract $application
     *
     * @return bool
     */
    public function uninstall(ApplicationContract $application)
    {
        $this->getHttpClient()->request('DELETE', $this->apiUrl($application->type()));

        return true;
    }

    /**
     * Connect load balancer.
     *
     * @return bool
     */
    public function balance(array $serverIds)
    {
        $this->getHttpClient()->request('PUT', $this->apiUrl('/balancing'), [
            'json' => $serverIds
        ]);

        return true;
    }
}
{'fraction_non_alphanumeric': 0.13372717508055854, 'fraction_numerical': 0.0, 'mean_word_length': 1.9752396166134185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3469060', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1043, 'n_words': 221}