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

Opened API for deprecated HTTP method calls #24

Merged
merged 2 commits into from
Jul 22, 2015
Merged

Conversation

TobiasHauck
Copy link
Member

There are some HTTP methods that are deprecated. We cannot provide them in this bundle because we are not able to test them properly. So if you want to use HTTP methods like LINK or UNLINK you can now extend the RestClient service and add these methods by yourself.

namespace Acme\MyBundle\Services;

use Ci\RestClientBundle\Services;

ExtendendRestClient extends RestClient {
    /**
     * {@inheritdoc}
     */
    public function link($url, array $options = array()) {
        return $this->curl->sendRequest($url, 'LINK', $options);
    }

    /**
     * {@inheritdoc}
     */
    public function unlink($url, array $options = array()) {
        return $this->curl->sendRequest($url, 'UNLINK', $options);
    }
}

Afterwards override the parameter "ci.restclient.class" in your applications parameters configuration with your new one (in this case "Acme\MyBundle\Services\ExtendedRestClient").

parameters:
    ci.restclient.class: Acme\MyBundle\Services\ExtendedRestClient

@TobiasHauck TobiasHauck mentioned this pull request Jul 22, 2015
@Chroq
Copy link

Chroq commented Jul 22, 2015

Thank you, Tobias, I'll do that.

Just for me, LINK/UNLINK methods are really deprecated ?

@TobiasHauck
Copy link
Member Author

Yes they are some kind of deprecated.

http://tools.ietf.org/id/draft-snell-link-method-01.html

"These were originally defined as "additional request methods" that were later dropped entirely from follow-on iterations of the HTTP specification due to previous lack of interest or use."

donjuandem added a commit that referenced this pull request Jul 22, 2015
Opened API for deprecated HTTP method calls
@donjuandem donjuandem merged commit a236363 into master Jul 22, 2015
@Chroq
Copy link

Chroq commented Jul 22, 2015

Indeed... I'll see if I can eventually change them for something else.

By the way, thank you very much !

@TobiasHauck
Copy link
Member Author

No problem. Thank you for supporting us!

@TobiasHauck TobiasHauck deleted the unlink-link branch January 29, 2016 14:01
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

Successfully merging this pull request may close these issues.

3 participants