Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to pass a large payload to request body #12

Closed
picaron opened this issue Nov 7, 2018 · 5 comments
Closed

Question: how to pass a large payload to request body #12

picaron opened this issue Nov 7, 2018 · 5 comments

Comments

@picaron
Copy link

picaron commented Nov 7, 2018

Hi again!

I am trying to pass a large payload to a PUT request

I trying converting to YAML and putting into the body but when my target API is called, it does not receive any body

here is my scenario:

---
threads: 1
base: 'http://localhost:8080'
iterations: 1

plan:
  - name: Update Configuration
    request:
      url: /api/channel/v1/custom/integration/configurations/xyz
      method: PUT
      headers:
        Cookie: "{{ authCookie }}"
        Content-Type: "application/json"
      body:
        domainValidateEndpoint: http://localhost:3000
        crestBaseConfiguration:
          host: http://localhost:3000
          azureHost: http://localhost:3000
          azureManagementHost: http://localhost:3000
          azureResource: http://localhost:3000
          partnerBillingDay: 1
          partnerCenterApiHost: https://api.partnercenter.microsoft.com
          partnerCenterAuthHost: https://login.windows.net
          partnerCenterResource: https://api.partnercenter.microsoft.com
          azureProvisioningDelayInMinutes: 180
          credentialsSetupStep: COMPLETED
          apiSetupStep: COMPLETED
          apiAuthorizationStep: COMPLETED
          configuredByAppDirect: false
          crestConfigurations:
            USA:
              azureConfig:
                clientId: someId
                clientSecret: someSecret
                managementUsername: test@host.com
                managementPassword: someSecret
                grantType: PASSWORD
                encrypted: false
              partnerCenterConfiguration:
                clientId: 6c9f572a-d69a-4e08-b4e5-194696492374
                applicationDomain: dummy.onmicrosoft.com
              resellerCaid: 6c9f572a-d69a-4e08-b4e5-194696492374
              resellerDomain: dummy.onmicrosoft.com
              resellerPurchaseEnabled: true
          cspAzureConfigValid: true
        mosiEnabled: false
        crestEnabled: true
        azureEnabled: true
@picaron
Copy link
Author

picaron commented Nov 7, 2018

it would be nice to have a way to pass a large payload as a multi-line string

@picaron picaron changed the title Questipn: how to pass a large payload to request body Question: how to pass a large payload to request body Nov 7, 2018
@picaron
Copy link
Author

picaron commented Nov 7, 2018

nevermind, I figured I could simply put > and then the entire JSON body inline!

@picaron picaron closed this as completed Nov 7, 2018
@Mobilpadde
Copy link

@picaron how'd you pass the josn body?

@picaron
Copy link
Author

picaron commented Aug 15, 2019

@Mobilpadde you have to use the > character

here is an example:

---
threads: 5
base: 'https://targethost.com'
iterations: 5

plan:
  - name: Validate MS configuration
    request:
      url: /api/v1/configuration
      method: POST
      headers:
        Cookie: "...."
        Content-Type: "application/json"
      body: >
        {
          "crestBaseConfiguration": {
            "azureProvisioningDelayInMinutes": 180,
            "credentialsSetupStep": "COMPLETED",
            "apiSetupStep": "COMPLETED",
            "apiAuthorizationStep": "COMPLETED",
            "configuredByAppDirect": false,
            "crestConfigurations": {
              "USA": {
                "azureConfig": {
                  "clientId": "....",
                  "clientSecret": "....",
                  "managementUsername": "....",
                  "managementPassword": "....",
                  "grantType": "PASSWORD"
                },
                "partnerCenterConfiguration": {
                  "clientId": "...",
                  "applicationDomain": "..."
                },
                "resellerCaid": "...",
                "resellerDomain": "...",
                "resellerPurchaseEnabled": false
              }
            }
          }
        }

@fcsonline
Copy link
Owner

Cool! 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants