ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • httpie post request example
    python 2019. 11. 8. 09:17
    ]# http -v POST https://openstack/loadbalancers/ \
    extra_rules:='[{
        "listener": {"protocol": "HTTP", "protocol_port": 80, "x_forwarded_for": true, "x_forwarded_port": true, "x_forwarded_proto": true},
        "member": {"protocol_port": 80},
        "monitor": {"delay": 5, "max_retries": 3, "timeout": 3, "type": "HTTP", "url_path": "/"},
        "pool": {"lb_algorithm": "ROUND_ROBIN", "protocol": "HTTP"}
    }]' \
    extra_security_groups:='[]' \
    name=l2 project=fea99e8d-05a9-4f30-95c5-1fdab936ece9
    
    POST /v1/loadbalancers/ HTTP/1.1
    Accept: application/json, */*
    Accept-Encoding: gzip, deflate
    Connection: keep-alive
    Content-Length: 430
    Content-Type: application/json
    Host: openstack
    User-Agent: HTTPie/0.9.9
    
    {
        "extra_rules": [
            {
                "listener": {
                    "protocol": "HTTP",
                    "protocol_port": 80,
                    "x_forwarded_for": true,
                    "x_forwarded_port": true,
                    "x_forwarded_proto": true
                },
                "member": {
                    "protocol_port": 80
                },
                "monitor": {
                    "delay": 5,
                    "max_retries": 3,
                    "timeout": 3,
                    "type": "HTTP",
                    "url_path": "/"
                },
                "pool": {
                    "lb_algorithm": "ROUND_ROBIN",
                    "protocol": "HTTP"
                }
            }
        ],
        "extra_security_groups": [],
        "name": "l2",
        "project": "fea99e8d-05a9-4f30-95c5-1fdab936ece9"
    }
    
    HTTP/1.1 201 Created
    Allow: GET, POST
    Connection: keep-alive
    Content-Length: 584
    Content-Type: application/json
    Date: Fri, 08 Nov 2019 00:14:50 GMT
    Server: nginx
    Vary: Accept
    X-Frame-Options: SAMEORIGIN
    
    {}

    'python' 카테고리의 다른 글

    dict 에서 최고값(value)의 key 구하기  (0) 2020.08.11
    dateutil, maya  (0) 2019.04.11
Designed by Tistory.