March 2020
Intermediate to advanced
392 pages
10h 10m
English
As we mentioned previously, you'll want to define the protocol and the format for your microservices clearly. It's handy if you can do this by defining a common library that contains structs, protocols, and classes that you need for that purpose. For example, let's take a look at the following output:
{ "email": "test@domain.com", "password": "test123"}
Now, let's create a struct that represents that output:
struct LoginResponse { var email: String var password: String}
As you can see, the output can be parsed into the struct. email and password are two variables that exist in both and so the struct can either read or write the preceding output.
Now, this struct can be used in all microservices that communicate with this ...
Read now
Unlock full access