Skip to content

Commit

Permalink
Merge pull request #40 from selcuktemizsoy/patch-1
Browse files Browse the repository at this point in the history
Update mock-server.md
  • Loading branch information
leelaprasadv authored Nov 3, 2023
2 parents dd6ab00 + 3278937 commit 8945fa5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/guides/mock-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,19 @@ mock.start(3000);

```shell
# Returns all interactions.
curl --location --request GET 'http://localhost:9393/api/pactum/interactions'
curl --location --request GET 'http://localhost:3000/api/pactum/interactions'
```

```shell
# Returns a single interaction.
curl --location --request GET 'http://localhost:9393/api/pactum/interactions?id=m1uh9'
curl --location --request GET 'http://localhost:3000/api/pactum/interactions?id=m1uh9'
```

#### POST - /api/pactum/interactions

```shell
# Adds multiple interactions to the server and returns array of interaction ids
curl --location --request POST 'http://localhost:9393/api/pactum/interactions' \
curl --location --request POST 'http://localhost:3000/api/pactum/interactions' \
--header 'Content-Type: application/json' \
--data-raw '[{
"request": {
Expand All @@ -297,12 +297,12 @@ curl --location --request POST 'http://localhost:9393/api/pactum/interactions' \

```shell
# Removes a single interaction with id m1uh9
curl --location --request DELETE 'http://localhost:9393/api/pactum/interactions?id=m1uh9'
curl --location --request DELETE 'http://localhost:3000/api/pactum/interactions?id=m1uh9'
```

```shell
# Removes all interactions
curl --location --request DELETE 'http://localhost:9393/api/pactum/interactions'
curl --location --request DELETE 'http://localhost:3000/api/pactum/interactions'
```

### Using Remote Mock Server
Expand Down Expand Up @@ -363,4 +363,4 @@ await mock.addInteraction({

## See Also

- [Interaction Handler](/api/handlers/addInteractionHandler)
- [Interaction Handler](/api/handlers/addInteractionHandler)

0 comments on commit 8945fa5

Please sign in to comment.