Reshaping Request

116 views
Skip to first unread message

jbell

unread,
Sep 6, 2019, 7:59:18 PM9/6/19
to martianproxy-users
Hey, I'm checking out martian for use in krakend and wondering how to reshape requests.

For example, I might have a backend that wants a request shaped like,

POST /users
{
  "user" {
     "type": "customer",
     "email": <customer_email>
  }
}

But I want a proxy endpoint that looks like,

POST /customers
{
  "email": <customer_email>
}

Any tips on how to use martian to do this? I've seen the body.modifier but not sure how to use this dynamically.
Reply all
Reply to author
Forward
0 new messages