title: The property and value is going as null when I'm doing the Post request
body: <p>I was doing a Registration post request with some of the text fields but upon hitting the submit button the parameters and the values are going as empty.
  I do have set the names in all the text fields but still going as empty, have also added the required method, head and body but need some assistance.
  As a reference I'm attaching the code, thanks in advance</p>
  
  <pre><code>export class RegisterPage extends Component{
  
      constructor(props){
          super(props)
          this.state={
              userName : '',
              userEmail : '',
              mobileNumber : '',
              userPassword : ''
          } 
      }
  
      userRegister = () =&gt; {
          const {userName, userEmail, mobileNumber, userPassword} = this.state;
  
          fetch('http://localhost/jkdapi/index.php/AndroidApi/test', {
              method: 'POST',
              header:{
                  'Accept': 'application/json',
                  "Content-Type": "application/json"
              },
              body: JSON.stringify({
                  your_name : userName,
                  email: userEmail,
                  phone: mobileNumber,
                  password: userPassword,
              })
          })
          .then((response) =&gt; response.text())
              .then((responseJson)=&gt;{
                  alert(responseJson);
              })
              .catch((error)=&gt;{
                  console.error(error);
              });
      }
  
      render(){
          return(
              &lt;View style ={{width: '100%', height: "100%", justifyContent: 'center', 
               alignContent: 'center', alignSelf: 'center', backgroundColor : 'white'}}&gt;
                  &lt;Icon name="chevron-left" color="grey" onPress={() =&gt; this.props.navigation.goBack()} size={25} style={{ position: 'absolute', top: 30, left: 10 }} /&gt;
                  &lt;Text style ={styles.headingtext}&gt;Hello there!&lt;/Text&gt;
                  &lt;Text style ={{marginLeft: 45}}&gt;Enter details for Sign Up.&lt;/Text&gt;
                  &lt;TextInput 
                      placeholder = {"Enter the username"}
                      onChangeText={userName =&gt; this.setState({userName})}
                      style={styles.textinput1} /&gt;
                  &lt;TextInput 
                      placeholder = {"Enter the email"}
                      onChangeText={userEmail =&gt; this.setState({userEmail})}
                      style={styles.textinputrest} /&gt;
                  &lt;View style={{flexDirection: "row", marginHorizontal: 42, paddingHorizontal: 10, height: 50, 
                      width: '80%', borderRadius: 1, borderColor: 'orange', borderWidth: 1,
                      marginTop: '5%'}}&gt;
                      &lt;Image style={{height: 150, width: 30, marginTop: '5%', resizeMode: 'contain', alignSelf: 'center', justifyContent: 'center'}} source = {require('../../image/ic_australia.png')}/&gt;
                      &lt;Text style={{alignSelf: 'center', justifyContent: 'center', marginTop:"5%", marginLeft: 10, borderRightWidth:1, paddingRight: 10, borderRightColor: 'orange'}}&gt;+61&lt;/Text&gt;
                      &lt;TextInput 
                          placeholder = {"Enter the Phone number"}
                          onChangeText={mobileNumber =&gt; this.setState({mobileNumber})}
                          style={styles.textinputrest1} /&gt;
                  &lt;/View&gt;
                  &lt;TextInput 
                          placeholder = {"Enter the password"}
                          onChangeText={userPassword =&gt; this.setState({userPassword})}
                          style={styles.textinputrest} /&gt;
                  &lt;View style={{marginTop:"5%", width: "100%", alignSelf: 'center'}}&gt;
                      &lt;TouchableOpacity onPress = {this.userRegister} 
                          style={styles.button}&gt;
                          &lt;Text style ={{color : 'white', fontWeight: 'bold'}}&gt;CONTINUE&lt;/Text&gt;
                      &lt;/TouchableOpacity&gt;
                  &lt;/View&gt;
                  &lt;Text style={{justifyContent: 'center', alignSelf: 'center', marginTop:"5%", 
                      color: 'grey', textAlign: 'center'}}&gt;Will send you a OTP to your mobile number {"\n"} for verification&lt;/Text&gt;
              &lt;/View&gt;
          )
      }
  }
  </code></pre>