5

I use DHC by Reslet a Chrome extension, version 1.2.

When I create a first POST request to create an entity If I want to access to this request in a another request (repository feature) I cannot access the response.

I have the same problem with DELETE requests, but not for GET requests

Makoto
  • 104,088
  • 27
  • 192
  • 230
Sbert
  • 111
  • 2
  • I'm sorry, not sure I got it. Are you asking how to automatically put a value from one request to another one? How to make a reference on a request/response? – Filip Feb 01 '16 at 18:30

1 Answers1

3

I'm not sure to correctly understand what you want to do but I'll try to give you an answer.

Imagine I want to execute the following:

  • POST request to add a company using the URL /companies and get its identifier from the response
  • GET request to get the newly created company using the identifier from the previous request

To do that I need to save the first request. I save it with the name 1 - Add company under the project Company project and the service CRUD service:

Company project
  CRUD service
    1 - Add company

Here is what I can use within the second request within its URL field:

contactsapi.apispark.net/v1/companies/{"Company project"
    ."CRUD scenario"."1 - Add company".response.body.id}

This way DHC will use the value of the id field in the response body from the latest executed 1 - Add company request in the history.

Makoto
  • 104,088
  • 27
  • 192
  • 230
Thierry Templier
  • 198,364
  • 44
  • 396
  • 360