Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Input:delete doesn't support json for REST Controller?
  • I have been trying to send a request body with header Accept=application/json like I did for Post.

    But Input::Delete return an array size of 1, with key became the whole request body and value as empty.

    i.e json format as:
    {identity_id:123}

    Input::delete() :
    key value
    [{identity_id:123}] = ""


    Then I tried to send my Request Body as:
    identity_id=123

    Input::delete() :
    key value
    [identity_id] = "123"

    Why is that?
  • HarroHarro
    Accepted Answer
    If you are passing json, you need to use Input::json(), that is unrelated to the HTTP method being used.

    By default, data is submitted in HTTP in a query string type encoding, e.g. like "first=value&arr[]=foo+bar&arr[]=baz".

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion