title: What is the way of making "Http.post" call in elm
body: <p>I have used the http post in elm in following manner but it is not working and on server side I am getting the empty body.
  Can anybody tell me what is wrong with this code.this is the code of my command module</p>
  
  <pre><code>module SignupForm.Commands exposing (..)
  
  import Http exposing(..)
  import Json.Decode as Decode exposing (field)
  import SignupForm.Models exposing (..)
  import SignupForm.Messages exposing (..)
  import Json.Encode as Encode
  import Debug exposing (log)
  
  
  
  
  memberDecoder : Decode.Decoder UserDetails
  memberDecoder =
      Decode.map4 UserDetails
          (field "fname" Decode.string)
          (field "lname" Decode.string)
          (field "email" Decode.string)
          (field "password" Decode.string)
  
  
  
  saveUrl : String
  saveUrl =
     "http://localhost:4000/userSignup"
  
  
  saveRequest : UserDetails -&gt; Http.Request UserDetails
  saveRequest d =
      Http.request
  
  
          { body = memberEncoded d |&gt; Http.jsonBody
          , expect = Http.expectJson memberDecoder
          , headers = defaultRequestHeaders
          , method = "POST"
          , timeout = Nothing
          , url = saveUrl
          , withCredentials = False
          }
  
  
  
  defaultRequestHeaders : List Header
  defaultRequestHeaders =
      [ Http.header "Content-Type"  "application/x-www-form-urlencoded"
      ]
  
  fetchAll : UserDetails -&gt; Cmd Msg
  fetchAll data =
      saveRequest data
          |&gt; Http.send OnSignUp
  
  
  memberEncoded : UserDetails -&gt; Encode.Value
  memberEncoded data =
      let
          list =
              [ ( "fname", Encode.string data.fname )
              , ( "lname", Encode.string data.lname )
              , ( "email", Encode.string data.email )
              , ( "password", Encode.string data.password )
              ]
      in
          list
              |&gt; Encode.object
  </code></pre>