Repo Added
|
Build
414
Last
|
Files
69
|
Badge
README BADGES
|
github
- Implement http_request action type (#529) Summary: Pull Request resolved: https://github.com/facebookincubator/TTPForge/pull/529 This adds a step/action type called `http_request` that works like this: GET request example: ```yaml --- http_request: https://facebook.com type: GET proxy: http://localhost:8080 cleanup: inline: | echo "No cleanup required." ``` POST request example: ```yaml http_request: https://api.someexample.com/api/v1/someendoint/ type: POST headers: - field: User-Agent value: {{.Args.user_agent}} - field: Content-Type value: application/x-www-form-urlencoded; charset=UTF-8 - field: Accepted-Encoding value: gzip, deflate body: > params={ "client_input_params": { "username_input": "", }, "server_params": { "is_from_logged_out": 0, "device_id": "android-3072a22f5cc5db69", "waterfall_id": null, "event_source": "login_home_page", } } bloks_versioning_id=bda53c582b46018428c2e82f7376c46f7 regex: | [^"]*arm cleanup: inline: | echo "No cleanup required." ``` The fields have the following meaning: ``` http_request: `url`: URL to which the request is made. `type`: The http request type (GET, POST, PUT, PATCH, DELETE). `headers`: The http request headers, `field` and `value`. `parameters`: The http request parameters, `name` and `value`. `body`: String for request body data. `proxy`: The http proxy to use for requests `regex`: Regular expression, if specified return only matching string. `response`: Shell variable name to store request's response. ``` Differential Revision: D69953549
44 of 126 new or added lines in 2 files covered. (34.92%)
1892 of 3008 relevant lines covered (62.9%)
15.05 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|