title: How to override the request method (from 'PUT' into 'POST') in Django Rest Framework
body: <p>I'm coding a plugin-wrapper for provide a <a href="https://github.com/mgaitan/waliki/" rel="nofollow noreferrer">app</a> to <a href="http://www.django-rest-framework.org" rel="nofollow noreferrer">restfull</a>, problem is the app don't process PUT request, then I get from resfull a PUT request and should change request's method into a POST request.</p>
  <p>I have tried this:</p>
  <pre><code>self.context['request'].method = 'POST'
  </code></pre>
  <p>but obviously don't works</p>
  <p>How I could do it?
  Thanks</p>
  <h1>Update:</h1>
  <p>Serializer code:</p>
  <pre><code>class PageEditSerializer(serializers.ModelSerializer):
      &quot;&quot;&quot;
      Serializer Class to edit and delete a Page.
      &quot;&quot;&quot;
      raw = serializers.CharField()
  
      def save(self):
  
          #no works
          self.context['request'].method = 'POST'
  
          &quot;&quot;&quot;call to waliki new function&quot;&quot;&quot;
          views.edit(self.context['request'], self.instance.slug)
  
      class Meta():
          model = Page
          fields = ('id', 'title', 'slug', 'raw', )
          read_only_fields = ('id', 'slug', )
  </code></pre>
  <p>View code:</p>
  <pre><code>class PageEditView(generics.RetrieveUpdateAPIView):
      &quot;&quot;&quot;
      A simple View to edit a Page.
      &quot;&quot;&quot;
      lookup_field = 'slug'
      serializer_class = PageEditSerializer
      permission_classes = (permissions.AllowAny, )
  
      def get_queryset(self):
          return Page.objects.filter(slug=self.kwargs['slug'])
  </code></pre>