Commit graph

4 commits

Author SHA1 Message Date
guyben
849ea0e0f3 Fix --content-type and --data inputs in curl command
content-type needs to be parsed (no automatic parsing from String)

data was splitting on commas, meaning --data="key=value1,value2" was sent to the server as "key=value1&value2"

NOTE - you'd expect there to already be a "do nothing splitter", right? But there isn't :/

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223346887
2018-12-03 19:15:33 -05:00
guyben
b48061b792 Refactor AppEngineConnection
AppEngineConnection can now connect to all services and not just the tools.

The default is still the tools.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218734983
2018-10-29 15:34:12 -04:00
mmuller
e43349592d Allow AppEngineConnection to target services other than "tools"
This change required several things:
- Separating out the interfaces that merely do HTTP calls to the backend from those
  that require the remote API (only load the remote API for the latter).  Only the
  tools service provides the remote api endpoint.
- Removing the XSRF token as an authentication mechanism (with OAUTH, we no longer
  need this, and trying to provide it requires initialization of the datastore
  code which requires the remote API)

I can't think of a compelling unit test for this beyond what already exists.
Tested:
  Verified that:
  - nomulus tool commands (e.g. "list_tlds") work against the tools service as they
    currently do
  - The "curl" command hits endpoints on "tools" by default.
  - We can use --server to specify endpoints on the default service.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211510454
2018-09-08 00:10:06 -04:00
mmuller
e3977024f3 Create a nomulus "curl" command
Create a command to send arbitrary, authenticated HTTP requests to the backend
and remove the existing commands that are basically just wrappers around this.

Tested:
  In addition to the unit tests, verified both get and post requests against
  alpha.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207756509
2018-08-10 13:46:48 -04:00