lkuczborski / SwiftMoyaCodeGenerator

This is a Paw Extension that generates Moya code.
MIT License
51 stars 7 forks source link

Provide sampleData for Moya Target #1

Open lkuczborski opened 8 years ago

lkuczborski commented 8 years ago

As soon as @mittsh will provide Response API ;)

mittsh commented 8 years ago

@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: