Postman Mock Server Tutorial for Beginners | Mock POST and GET Request in Postman | Postman Tutorial

Postman Mock Server Tutorial for Beginners | Mock POST and GET Request in Postman | Postman Tutorial

Tutorials Pedia

2 года назад

17,395 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@carl14602
@carl14602 - 18.01.2022 22:19

Thank you so much. I was having trouble understanding how to mock POST requests, and now it makes a lot more sense

Ответить
@venkatsai6462
@venkatsai6462 - 19.01.2022 16:38

I have a small doubt if I change anything in post request ,like if I change any single letter in the body I nee to get like error code 422 .how can I get that . actually I have stucked up there can u help me out

Ответить
@user-ot5zj6qt7j
@user-ot5zj6qt7j - 13.05.2022 08:34

NICE! Thank you for your work!

Ответить
@igormorozov6311
@igormorozov6311 - 08.07.2022 15:19

great. Thank you

Ответить
@igormorozov6311
@igormorozov6311 - 10.07.2022 00:01

Hi Sir, could you explain please: how to get "Bad Request"- responce from the Mock Server if I send a wrong request? for instance, if I send nothing but I must to send some integer. Thank you

Ответить
@UknownCompiler
@UknownCompiler - 24.09.2022 06:45

Hi I am new to postman, i have a question please. do we always have to manually add queries params and their examples with the json that needs to be a response? is there another way where we can add json that has many users in one example then we can pass queries dynamically and we fetch user id without manually creating ids?

Ответить
@perveziqbal135
@perveziqbal135 - 27.11.2022 09:25

Can I use this mock server For This Mutation in react?
I didn't find any video for this topic, please create a video for this one
Here's an example of a mutation that adds a new todo to the server:



function App() {
const mutation = useMutation({
mutationFn: newTodo => {
return axios.post('/todos', newTodo)
}
})

return (
<div>
{mutation.isLoading ? (
'Adding todo...'
) : (
<>
{mutation.isError ? (
<div>An error occurred: {mutation.error.message}</div>
) : null}

{mutation.isSuccess ? <div>Todo added!</div> : null}

<button
onClick={() => {
mutation.mutate({ id: new Date(), title: 'Do Laundry' })
}}
>
Create Todo
</button>
</>
)}
</div>
)
}

Ответить
@tao6414
@tao6414 - 28.12.2022 01:44

amzing! learned!I create the require throug the Mock Sever and then use it in the Collection before I watch this vadeo. now I will deleta them and create them by the way of this video

Ответить
@mohammedghabyen721
@mohammedghabyen721 - 24.04.2023 17:55

Thanks

Ответить
@JoseManuel-lo2ed
@JoseManuel-lo2ed - 10.05.2023 12:50

What am I doing wrong?
I am trying to do this with XML, can you help me?

Best regards.

Ответить
@karlkrasnowsky3895
@karlkrasnowsky3895 - 30.05.2023 21:24

Thanks... I was trying to figure out how these examples worked when defining the mock server. From another tutorial it seemed that you did this from the mock server directly, not the collection... so the mock is created via information that comes from the collection, not the other way around. This makes sense.

Ответить
@gabrielacintia1135
@gabrielacintia1135 - 30.11.2023 04:35

Very good
😀

Ответить
@freemti62
@freemti62 - 30.12.2023 03:12

Thank you, this was the first Postman Mocking tutorial I found that explained it in a way I could follow.

Ответить