Difference between revisions of "HTTP Services"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
|- | |- | ||
! Command Header | ! Command Header | ||
+ | ! Available since system-version | ||
! Description | ! Description | ||
|- | |- | ||
| 0x00010044 | | 0x00010044 | ||
+ | | | ||
| [[HTTPC:Initialize|Initialize]] | | [[HTTPC:Initialize|Initialize]] | ||
|- | |- | ||
| 0x00020082 | | 0x00020082 | ||
+ | | | ||
| [[HTTPC:CreateContext|CreateContext]] | | [[HTTPC:CreateContext|CreateContext]] | ||
|- | |- | ||
| 0x00030040 | | 0x00030040 | ||
+ | | | ||
| [[HTTPC:CloseContext|CloseContext]] | | [[HTTPC:CloseContext|CloseContext]] | ||
|- | |- | ||
| 0x00040040 | | 0x00040040 | ||
+ | | | ||
| [[HTTPC:CancelConnection|CancelConnection]] | | [[HTTPC:CancelConnection|CancelConnection]] | ||
|- | |- | ||
| 0x00050040 | | 0x00050040 | ||
+ | | | ||
| [[HTTPC:GetRequestState|GetRequestState]] | | [[HTTPC:GetRequestState|GetRequestState]] | ||
|- | |- | ||
| 0x00060040 | | 0x00060040 | ||
+ | | | ||
| [[HTTPC:GetDownloadSizeState|GetDownloadSizeState]] | | [[HTTPC:GetDownloadSizeState|GetDownloadSizeState]] | ||
|- | |- | ||
| 0x00070040 | | 0x00070040 | ||
+ | | | ||
| [[HTTPC:GetRequestError|GetRequestError]] | | [[HTTPC:GetRequestError|GetRequestError]] | ||
|- | |- | ||
| 0x00080042 | | 0x00080042 | ||
+ | | | ||
| [[HTTPC:InitializeConnectionSession|InitializeConnectionSession]] | | [[HTTPC:InitializeConnectionSession|InitializeConnectionSession]] | ||
|- | |- | ||
| 0x00090040 | | 0x00090040 | ||
+ | | | ||
| [[HTTPC:BeginRequest|BeginRequest]] | | [[HTTPC:BeginRequest|BeginRequest]] | ||
|- | |- | ||
| 0x000A0040 | | 0x000A0040 | ||
+ | | | ||
| [[HTTPC:BeginRequestAsync|BeginRequestAsync]] | | [[HTTPC:BeginRequestAsync|BeginRequestAsync]] | ||
|- | |- | ||
| 0x000B0082 | | 0x000B0082 | ||
+ | | | ||
| [[HTTPC:ReceiveData|ReceiveData]] | | [[HTTPC:ReceiveData|ReceiveData]] | ||
|- | |- | ||
| 0x000C0102 | | 0x000C0102 | ||
+ | | | ||
| [[HTTPC:ReceiveDataTimeout|ReceiveDataTimeout]] | | [[HTTPC:ReceiveDataTimeout|ReceiveDataTimeout]] | ||
|- | |- | ||
| 0x000D0146 | | 0x000D0146 | ||
+ | | | ||
| [[HTTPC:SetProxy|SetProxy]] | | [[HTTPC:SetProxy|SetProxy]] | ||
|- | |- | ||
| 0x000E0040 | | 0x000E0040 | ||
+ | | | ||
| [[HTTPC:SetProxyDefault|SetProxyDefault]] | | [[HTTPC:SetProxyDefault|SetProxyDefault]] | ||
|- | |- | ||
| 0x000F00C4 | | 0x000F00C4 | ||
+ | | | ||
| [[HTTPC:SetBasicAuthorization|SetBasicAuthorization]] | | [[HTTPC:SetBasicAuthorization|SetBasicAuthorization]] | ||
|- | |- | ||
| 0x00100080 | | 0x00100080 | ||
+ | | | ||
| SetSocketBufferSize | | SetSocketBufferSize | ||
|- | |- | ||
| 0x001100C4 | | 0x001100C4 | ||
+ | | | ||
| [[HTTPC:AddRequestHeader|AddRequestHeader]] | | [[HTTPC:AddRequestHeader|AddRequestHeader]] | ||
|- | |- | ||
| 0x001200C4 | | 0x001200C4 | ||
+ | | | ||
| [[HTTPC:AddPostDataAscii|AddPostDataAscii]] | | [[HTTPC:AddPostDataAscii|AddPostDataAscii]] | ||
|- | |- | ||
| 0x001300C4 | | 0x001300C4 | ||
+ | | | ||
| AddPostDataBinary | | AddPostDataBinary | ||
|- | |- | ||
| 0x00140082 | | 0x00140082 | ||
+ | | | ||
| AddPostDataRaw | | AddPostDataRaw | ||
|- | |- | ||
| 0x00150080 | | 0x00150080 | ||
+ | | | ||
| SetPostDataType(u8 enum) | | SetPostDataType(u8 enum) | ||
|- | |- | ||
| 0x001600C4 | | 0x001600C4 | ||
+ | | | ||
| SendPostDataAscii | | SendPostDataAscii | ||
|- | |- | ||
| 0x00170144 | | 0x00170144 | ||
+ | | | ||
| SendPostDataAsciiTimeout | | SendPostDataAsciiTimeout | ||
|- | |- | ||
| 0x001800C4 | | 0x001800C4 | ||
+ | | | ||
| SendPostDataBinary | | SendPostDataBinary | ||
|- | |- | ||
| 0x00190144 | | 0x00190144 | ||
+ | | | ||
| SendPostDataBinaryTimeout | | SendPostDataBinaryTimeout | ||
|- | |- | ||
| 0x001A0082 | | 0x001A0082 | ||
+ | | | ||
| SendPostDataRaw | | SendPostDataRaw | ||
|- | |- | ||
| 0x001B0102 | | 0x001B0102 | ||
+ | | | ||
| [[HTTPC:SendPOSTDataTimeout|SendPOSTDataRawTimeout]] | | [[HTTPC:SendPOSTDataTimeout|SendPOSTDataRawTimeout]] | ||
|- | |- | ||
| 0x001C0080 | | 0x001C0080 | ||
+ | | | ||
| SetPostDataEncoding | | SetPostDataEncoding | ||
|- | |- | ||
| 0x001D0040 | | 0x001D0040 | ||
+ | | | ||
| NotifyFinishSendPostData | | NotifyFinishSendPostData | ||
|- | |- | ||
| 0x001E00C4 | | 0x001E00C4 | ||
+ | | | ||
| [[HTTPC:GetResponseHeader|GetResponseHeader]] | | [[HTTPC:GetResponseHeader|GetResponseHeader]] | ||
|- | |- | ||
| 0x001F0144 | | 0x001F0144 | ||
+ | | | ||
| [[HTTPC:GetResponseHeaderTimeout|GetResponseHeaderTimeout]] | | [[HTTPC:GetResponseHeaderTimeout|GetResponseHeaderTimeout]] | ||
|- | |- | ||
| 0x00200082 | | 0x00200082 | ||
+ | | | ||
| [[HTTPC:GetResponseData|GetResponseData]] | | [[HTTPC:GetResponseData|GetResponseData]] | ||
|- | |- | ||
| 0x00210102 | | 0x00210102 | ||
+ | | | ||
| GetResponseDataTimeout | | GetResponseDataTimeout | ||
|- | |- | ||
| 0x00220040 | | 0x00220040 | ||
+ | | | ||
| [[HTTPC:GetResponseStatusCode|GetResponseStatusCode]] | | [[HTTPC:GetResponseStatusCode|GetResponseStatusCode]] | ||
|- | |- | ||
| 0x002300C0 | | 0x002300C0 | ||
+ | | | ||
| [[HTTPC:GetResponseStatusCodeTimeout|GetResponseStatusCodeTimeout]] | | [[HTTPC:GetResponseStatusCodeTimeout|GetResponseStatusCodeTimeout]] | ||
|- | |- | ||
| 0x00240082 | | 0x00240082 | ||
+ | | | ||
| [[HTTPC:AddTrustedRootCA|AddTrustedRootCA]] | | [[HTTPC:AddTrustedRootCA|AddTrustedRootCA]] | ||
|- | |- | ||
| 0x00250080 | | 0x00250080 | ||
+ | | | ||
| cmd[1]=httpcontext, cmd[2]=val. This is a wrapper for [[SSL_Services|SSLC]] command 0x00060080. The output value from that SSLC command is not returned by this HTTP command. Somehow related to [[HTTPC:AddTrustedRootCA|AddTrustedRootCA]]. | | cmd[1]=httpcontext, cmd[2]=val. This is a wrapper for [[SSL_Services|SSLC]] command 0x00060080. The output value from that SSLC command is not returned by this HTTP command. Somehow related to [[HTTPC:AddTrustedRootCA|AddTrustedRootCA]]. | ||
|- | |- | ||
| 0x00260080 | | 0x00260080 | ||
+ | | | ||
| [[HTTPC:SelectRootCertChain|SelectRootCertChain]] | | [[HTTPC:SelectRootCertChain|SelectRootCertChain]] | ||
|- | |- | ||
| 0x002700C4 | | 0x002700C4 | ||
+ | | | ||
| [[HTTPC:SetClientCert|SetClientCert]] | | [[HTTPC:SetClientCert|SetClientCert]] | ||
|- | |- | ||
| 0x00280080 | | 0x00280080 | ||
+ | | | ||
| Somehow related to [[HTTPC:SetClientCert|SetClientCert]]. | | Somehow related to [[HTTPC:SetClientCert|SetClientCert]]. | ||
|- | |- | ||
| 0x00290080 | | 0x00290080 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x002A0040 | | 0x002A0040 | ||
+ | | | ||
| GetSSLError? | | GetSSLError? | ||
|- | |- | ||
| 0x002B0080 | | 0x002B0080 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x002C0080 | | 0x002C0080 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x002D0000 | | 0x002D0000 | ||
+ | | | ||
| [[HTTPC:CreateRootCertChain|CreateRootCertChain]] | | [[HTTPC:CreateRootCertChain|CreateRootCertChain]] | ||
|- | |- | ||
| 0x002E0040 | | 0x002E0040 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x002F0082 | | 0x002F0082 | ||
+ | | | ||
| [[HTTPC:RootCertChainAddCert|RootCertChainAddCert]] | | [[HTTPC:RootCertChainAddCert|RootCertChainAddCert]] | ||
|- | |- | ||
| 0x00300080 | | 0x00300080 | ||
+ | | | ||
| (u32 rootcertchain_contexthandle, u32 val) Presumably the RootCertChain version of command 0x00250080. | | (u32 rootcertchain_contexthandle, u32 val) Presumably the RootCertChain version of command 0x00250080. | ||
|- | |- | ||
| 0x00310080 | | 0x00310080 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x00320084 | | 0x00320084 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x00330040 | | 0x00330040 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x00340040 | | 0x00340040 | ||
+ | | | ||
| | | | ||
|- | |- | ||
| 0x00350186 | | 0x00350186 | ||
+ | | | ||
| SetDefaultProxy | | SetDefaultProxy | ||
|- | |- | ||
| 0x00360000 | | 0x00360000 | ||
+ | | | ||
| ClearDNSCache | | ClearDNSCache | ||
|- | |- | ||
| 0x00370080 | | 0x00370080 | ||
+ | | | ||
| SetKeepAlive (bool) | | SetKeepAlive (bool) | ||
|- | |- | ||
| 0x003800C0 | | 0x003800C0 | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| SetPostDataTypeSize (u8 enum, u32 size) (similar to SetPostDataType) | | SetPostDataTypeSize (u8 enum, u32 size) (similar to SetPostDataType) | ||
|- | |- | ||
| 0x00390000 | | 0x00390000 | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| Finalize | | Finalize | ||
|- | |- | ||
| 0x003A.... | | 0x003A.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x003B0082 | | 0x003B0082 | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x003C.... | | 0x003C.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x003D.... | | 0x003D.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x003E.... | | 0x003E.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x003F.... | | 0x003F.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x00400082 | | 0x00400082 | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x0041.... | | 0x0041.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|- | |- | ||
| 0x0042.... | | 0x0042.... | ||
+ | | Unknown, >[[2.0.0-2|2.0.0-X]]. | ||
| | | | ||
|} | |} |
Revision as of 01:21, 9 December 2015
HTTP service "http:C"
Command Header | Available since system-version | Description |
---|---|---|
0x00010044 | Initialize | |
0x00020082 | CreateContext | |
0x00030040 | CloseContext | |
0x00040040 | CancelConnection | |
0x00050040 | GetRequestState | |
0x00060040 | GetDownloadSizeState | |
0x00070040 | GetRequestError | |
0x00080042 | InitializeConnectionSession | |
0x00090040 | BeginRequest | |
0x000A0040 | BeginRequestAsync | |
0x000B0082 | ReceiveData | |
0x000C0102 | ReceiveDataTimeout | |
0x000D0146 | SetProxy | |
0x000E0040 | SetProxyDefault | |
0x000F00C4 | SetBasicAuthorization | |
0x00100080 | SetSocketBufferSize | |
0x001100C4 | AddRequestHeader | |
0x001200C4 | AddPostDataAscii | |
0x001300C4 | AddPostDataBinary | |
0x00140082 | AddPostDataRaw | |
0x00150080 | SetPostDataType(u8 enum) | |
0x001600C4 | SendPostDataAscii | |
0x00170144 | SendPostDataAsciiTimeout | |
0x001800C4 | SendPostDataBinary | |
0x00190144 | SendPostDataBinaryTimeout | |
0x001A0082 | SendPostDataRaw | |
0x001B0102 | SendPOSTDataRawTimeout | |
0x001C0080 | SetPostDataEncoding | |
0x001D0040 | NotifyFinishSendPostData | |
0x001E00C4 | GetResponseHeader | |
0x001F0144 | GetResponseHeaderTimeout | |
0x00200082 | GetResponseData | |
0x00210102 | GetResponseDataTimeout | |
0x00220040 | GetResponseStatusCode | |
0x002300C0 | GetResponseStatusCodeTimeout | |
0x00240082 | AddTrustedRootCA | |
0x00250080 | cmd[1]=httpcontext, cmd[2]=val. This is a wrapper for SSLC command 0x00060080. The output value from that SSLC command is not returned by this HTTP command. Somehow related to AddTrustedRootCA. | |
0x00260080 | SelectRootCertChain | |
0x002700C4 | SetClientCert | |
0x00280080 | Somehow related to SetClientCert. | |
0x00290080 | ||
0x002A0040 | GetSSLError? | |
0x002B0080 | ||
0x002C0080 | ||
0x002D0000 | CreateRootCertChain | |
0x002E0040 | ||
0x002F0082 | RootCertChainAddCert | |
0x00300080 | (u32 rootcertchain_contexthandle, u32 val) Presumably the RootCertChain version of command 0x00250080. | |
0x00310080 | ||
0x00320084 | ||
0x00330040 | ||
0x00340040 | ||
0x00350186 | SetDefaultProxy | |
0x00360000 | ClearDNSCache | |
0x00370080 | SetKeepAlive (bool) | |
0x003800C0 | Unknown, >2.0.0-X. | SetPostDataTypeSize (u8 enum, u32 size) (similar to SetPostDataType) |
0x00390000 | Unknown, >2.0.0-X. | Finalize |
0x003A.... | Unknown, >2.0.0-X. | |
0x003B0082 | Unknown, >2.0.0-X. | |
0x003C.... | Unknown, >2.0.0-X. | |
0x003D.... | Unknown, >2.0.0-X. | |
0x003E.... | Unknown, >2.0.0-X. | |
0x003F.... | Unknown, >2.0.0-X. | |
0x00400082 | Unknown, >2.0.0-X. | |
0x0041.... | Unknown, >2.0.0-X. | |
0x0042.... | Unknown, >2.0.0-X. |
TLS Root CAs
Initially a HTTP context will not trust any root-CAs at all. Which root-CAs to trust must be explicitly specified via the add-root-CA service command(s).
RootCertChains can be used to easily select a particular chain of trusted root-CAs with multiple HTTP contexts, without having to re-send each of the root-CA commands for each HTTP context.
Error codes
Error code | Description |
---|---|
0xd8a0a03c | The HTTPS server's TLS certificate is signed by an unknown/not-trusted root CA. |
0xd8a0a046 | This is returned by HTTPC:Initialize when no network connection is available(or at least when wifi is disabled via Home Menu on New3DS). |
0xd8a0a066 | This indicates that the context handle is wrong. |