Skip to main content
se añadieron 367 caracteres en el cuerpo
Origen Enlace
fredyfx
  • 13.2k
  • 11
  • 33
  • 65

Intenta con esto:

 {{#each response}}
            <div class="col-sm-6 col-lg-4 col-xl-3 mb-5">
                <div class="card">
                    <div class="test card-topper card-img-top {{response.keyword}}">{{response.keyword}}</div>
                    <div class="card-body">
                        <h2>{{response.keyword}}</h2>
                        <p>{{response.author}}<br>{{response.domain}}</p>
                        <!--<a href="{{website_url}}" class="card-link" target="_blank" rel="noopener noreferrer">Website</a>
                        <a href="https://www.google.com/maps/search/?api=1&query={{response.name}} {{response.state}}" class="card-link" target="_blank" rel="noopener noreferrer">Map</a>-->
                        <p>{{response.clean_text}}</p>
                    </div>
                </div>
            </div>
            {{/each}}

Actualización

Reemplaza:

pm.visualizer.set(template, {
    response: JSON.parse(responseBody)
});

Por:

pm.visualizer.set(template, {
    // Pass the response body parsed as JSON as `data`
    response: pm.response.json()
});

Fuente: https://learning.postman.com/docs/postman/sending-api-requests/visualizer/

Intenta con esto:

 {{#each response}}
            <div class="col-sm-6 col-lg-4 col-xl-3 mb-5">
                <div class="card">
                    <div class="test card-topper card-img-top {{response.keyword}}">{{response.keyword}}</div>
                    <div class="card-body">
                        <h2>{{response.keyword}}</h2>
                        <p>{{response.author}}<br>{{response.domain}}</p>
                        <!--<a href="{{website_url}}" class="card-link" target="_blank" rel="noopener noreferrer">Website</a>
                        <a href="https://www.google.com/maps/search/?api=1&query={{response.name}} {{response.state}}" class="card-link" target="_blank" rel="noopener noreferrer">Map</a>-->
                        <p>{{response.clean_text}}</p>
                    </div>
                </div>
            </div>
            {{/each}}

Intenta con esto:

 {{#each response}}
            <div class="col-sm-6 col-lg-4 col-xl-3 mb-5">
                <div class="card">
                    <div class="test card-topper card-img-top {{response.keyword}}">{{response.keyword}}</div>
                    <div class="card-body">
                        <h2>{{response.keyword}}</h2>
                        <p>{{response.author}}<br>{{response.domain}}</p>
                        <!--<a href="{{website_url}}" class="card-link" target="_blank" rel="noopener noreferrer">Website</a>
                        <a href="https://www.google.com/maps/search/?api=1&query={{response.name}} {{response.state}}" class="card-link" target="_blank" rel="noopener noreferrer">Map</a>-->
                        <p>{{response.clean_text}}</p>
                    </div>
                </div>
            </div>
            {{/each}}

Actualización

Reemplaza:

pm.visualizer.set(template, {
    response: JSON.parse(responseBody)
});

Por:

pm.visualizer.set(template, {
    // Pass the response body parsed as JSON as `data`
    response: pm.response.json()
});

Fuente: https://learning.postman.com/docs/postman/sending-api-requests/visualizer/

Origen Enlace
fredyfx
  • 13.2k
  • 11
  • 33
  • 65

Intenta con esto:

 {{#each response}}
            <div class="col-sm-6 col-lg-4 col-xl-3 mb-5">
                <div class="card">
                    <div class="test card-topper card-img-top {{response.keyword}}">{{response.keyword}}</div>
                    <div class="card-body">
                        <h2>{{response.keyword}}</h2>
                        <p>{{response.author}}<br>{{response.domain}}</p>
                        <!--<a href="{{website_url}}" class="card-link" target="_blank" rel="noopener noreferrer">Website</a>
                        <a href="https://www.google.com/maps/search/?api=1&query={{response.name}} {{response.state}}" class="card-link" target="_blank" rel="noopener noreferrer">Map</a>-->
                        <p>{{response.clean_text}}</p>
                    </div>
                </div>
            </div>
            {{/each}}