aboutsummaryrefslogtreecommitdiffstats
path: root/pages/develop/api/efl/net/dialer/http/property/primary_mode.txt
blob: 823b59896ea3b3ff93e89c22aa7f37c33f0f08f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
~~Title: Efl.Net.Dialer.Http.primary_mode~~
===== Values =====

  * **primary_mode** - %%Primary HTTP mode%%
===== Description =====

%%Is this request primarily a download or upload?%%

%%This property will change the behavior of %%[[:develop:api:efl:io:sizer|Efl.Io.Sizer]]%%:%%

%%- If %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.auto]]%%, then %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.download]]%% or %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.upload]]%% will be choosen based on the %%[[:develop:api:efl:net:dialer:http:property:method|Efl.Net.Dialer.Http.method]]%%: if "PUT", then it's upload, otherwise it's download.%%

%%- If %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.upload]]%%, applying a new size with %%[[:develop:api:efl:io:sizer:method:resize|Efl.Io.Sizer.resize]]%% or %%[[:develop:api:efl:io:sizer:property:size|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 %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.download]]%%, then %%[[:develop:api:efl:io:sizer:property:size|Efl.Io.Sizer.size.get]]%% will report the "Content-Length" provided by the server, if any.%%

%%If is worth to mention that one can provide and retrieve these values using %%[[:develop:api:efl:net:dialer:http:method:request_headers_get|Efl.Net.Dialer.Http.request_headers_get]]%% (to send) and %%[[:develop:api:efl:net:dialer:http:method:response_headers_get|Efl.Net.Dialer.Http.response_headers_get]]%% (what was received), as well as using the specific properties %%[[:develop:api:efl:net:dialer:http:property:request_content_length|Efl.Net.Dialer.Http.request_content_length]]%% (upload) and %%[[:develop:api:efl:net:dialer:http:property:response_content_length|Efl.Net.Dialer.Http.response_content_length]]%% (download).%%

//Since 1.19//


{{page>:develop:api-include:efl:net:dialer:http:property:primary_mode:description&nouser&nolink&nodate}}

==== Getter ====

%%The effective primary mode.%%

%%This will return one of %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.download]]%% or %%[[:develop:api:efl:net:dialer:http:primary_mode|Efl.Net.Dialer.Http.Primary_Mode.upload]]%%. If "auto" was set (the default), then it will pick the best based on the %%[[:develop:api:efl:net:dialer:http:property:method|Efl.Net.Dialer.Http.method]]%% in use.%%

//Since 1.19//
{{page>:develop:api-include:efl:net:dialer:http:property:primary_mode:getter_description&nouser&nolink&nodate}}


===== Signature =====

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

===== C signature =====

<code c>
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);
</code>

===== Implemented by =====

  * **Efl.Net.Dialer.Http.primary_mode**