Closed kerrykimbrough closed 4 years ago
Moco provides only raw text in its configuration, so you have to encode them by yourself.
Actually, I've been able to verify that manual encoding is NOT needed. The first example above works fine. Apparently, the server request handler that Moco uses does this automatically.
Certain characters in a request URI must be percent-encoded. For example, a space char must be encoded as "%20". My question is: how must I handle this when I'm configuring the expectations for the Moco server? This question ought to be answered in the documentation, but I couldn't find it.
For example, consider a request of the form
PATCH http://myhost.com/user/{id}?name={name}
whereid
is "A|B" andname
is "Mr. Peabody".What is the correct way to configure expectations for this request? If Moco handles encoding automatically, it might be like this:
Or if I have to compute the encoding manually, it might be like this: