Skip to content

Extend HTTP plugin by WithJsonBody(data) #625

@AntyaDev

Description

@AntyaDev

AC:

  • it should set header "Accept": "application/json"
  • it should serialize to JSON using JsonSerializer.SerializeToUtf8Bytes
var user = new UserData { Id = "1", Name = "anton" };

var request = Http.CreateRequest("GET", "https://nbomber.com")
                  .WithJsonBody(user);

var response = await Http.Send(httpClient, request);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions