Description

Is this request primarily a download or upload?

This property will change the behavior of Efl.Io.Sizer:

- If Efl.Net.Dialer.Http.Primary_Mode.auto, then Efl.Net.Dialer.Http.Primary_Mode.download or Efl.Net.Dialer.Http.Primary_Mode.upload will be choosen based on the Efl.Net.Dialer.Http.method: if "PUT", then it's upload, otherwise it's download.

- If Efl.Net.Dialer.Http.Primary_Mode.upload, applying a new size with Efl.Io.Sizer.resize or Efl.Io.Sizer.size.set will specify the "Content-Length" to upload. If no size is previously set, then the upload will happen in "Transfer-encoding: chunked".

- If Efl.Net.Dialer.Http.Primary_Mode.download, then Efl.Io.Sizer.size.get will report the "Content-Length" provided by the server, if any.

You can also provide and retrieve these values using Efl.Net.Dialer.Http.request_headers_get (to send) and Efl.Net.Dialer.Http.response_headers_get (what was received), as well as using the specific properties Efl.Net.Dialer.Http.request_content_length (upload) and Efl.Net.Dialer.Http.response_content_length (download).

Since 1.19

Values

  • primary_mode - Primary HTTP mode

Getter

The effective primary mode.

This will return one of Efl.Net.Dialer.Http.Primary_Mode.download or Efl.Net.Dialer.Http.Primary_Mode.upload. If "auto" was set (the default), then it will pick the best based on the Efl.Net.Dialer.Http.method in use.

Since 1.19

Signature

@property primary_mode {
    get {
        values {
            primary_mode: Efl.Net.Dialer.Http.Primary_Mode;
        }
    }
    set {
        values {
            primary_mode: Efl.Net.Dialer.Http.Primary_Mode;
        }
    }
}

C signature

Efl_Net_Dialer_Http_Primary_Mode efl_net_dialer_http_primary_mode_get(const Eo *obj);
void efl_net_dialer_http_primary_mode_set(Eo *obj, Efl_Net_Dialer_Http_Primary_Mode primary_mode);

Implemented by

  • Efl.Net.Dialer.Http.primary_mode