SwiftMoyaCodeGenerator icon indicating copy to clipboard operation
SwiftMoyaCodeGenerator copied to clipboard

Provide sampleData for Moya Target

Open lkuczborski opened this issue 9 years ago • 1 comments

As soon as @mittsh will provide Response API ;)

lkuczborski avatar Jan 03 '16 20:01 lkuczborski

@lkuczborski I'm very sorry for the late answer. And your work looks amazing! ...The good news is we already have this API, here's an example:

var exchange = request.getLastExchange(); // latest HTTP exchange (request + response) sent
var responseHeaders = exchange.responseHeaders; // a JS object (dictionary) with the response headers
var responseBody = exchange.responseBody; // the body as a string

See:

  • https://luckymarmot.com/paw/doc/Extensions/Reference/Request#getlastexchange
  • https://luckymarmot.com/paw/doc/Extensions/Reference/HTTPExchange

mittsh avatar Jan 07 '16 18:01 mittsh