Home > Blockchain >  Using postman for login testing
Using postman for login testing

Time:06-05

I am trying to login page with postman.

The system is made by laravel

My top page is like this below ,so it makes the _token automatically , and login by submitting email and password to http://localhost/login

   <div  style="border: 1px solid #ced4da; border-radius: 0;">
        <div >

            <form action="http://localhost/login" method="post">
                <input type="hidden" name="_token" value="APiqx3F5lxfBKvgPhV3uzzrj824afqLohGS1Lwx6">
                <div >
                    <input type="email" name="email"  value="" placeholder="email" autofocus>
                    <div >
                        <div >
                            <span ></span>
                        </div>
                    </div>
                                        </div>
                <div >
                    <input type="password" name="password"  placeholder="パスワード">
                    <div >
                        <div >
                            <span ></span>
                        </div>
                    </div>
                                        </div>
                <div >
               
         
               
                    
                    <div ; style="text-align:right;">

                      <button type="submit"  style="margin: 0 auto;background-color: #007bff;color:white; width: 100%;">
                        login 
                     
                      </button>

                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

I have tried like this but it says the POST method is not supported.

enter image description here

What is the correct way to test the login ??

CodePudding user response:

You are calling the wrong route. The route you should be using is localhost/login as this is the POST one.

CodePudding user response:

First thing to fix is http://localhost/login is the url. You need to add /login endpoint to the url. Next thing is, the particular url is defined in GET method. It is better to change it to POST method in your code.

  •  Tags:  
  • php
  • Related