Skip to content

Commit 989ad83

Browse files
juhaylinentrantanen
authored andcommitted
app: Add HTTP client
Add HTTP client with XAPOLL-based async I/O Jira: SM-209 Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
1 parent cf583ef commit 989ad83

8 files changed

Lines changed: 1745 additions & 3 deletions

File tree

app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ target_sources_ifdef(CONFIG_SM_CMUX app PRIVATE src/sm_cmux.c)
2828
target_sources_ifdef(CONFIG_SM_GNSS app PRIVATE src/sm_at_gnss.c)
2929
target_sources_ifdef(CONFIG_SM_NRF_CLOUD app PRIVATE src/sm_at_nrfcloud.c)
3030
target_sources_ifdef(CONFIG_SM_MQTTC app PRIVATE src/sm_at_mqtt.c)
31+
target_sources_ifdef(CONFIG_SM_HTTPC app PRIVATE src/sm_at_httpc.c)
3132
target_sources_ifdef(CONFIG_SM_MODEM_TRACE_BACKEND_CMUX app PRIVATE src/sm_trace_backend_cmux.c)
3233
target_sources_ifdef(CONFIG_SM_MODEM_TRACE_BACKEND_UART app PRIVATE src/sm_trace_backend_uart.c)
3334

app/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,28 @@ config SM_PGPS_INJECT_FIX_DATA
352352

353353
endif # SM_GNSS
354354

355+
config SM_HTTPC
356+
bool "HTTP client support"
357+
default y
358+
select EXPERIMENTAL
359+
help
360+
Enable HTTP client AT commands for making HTTP/HTTPS requests.
361+
Uses non-blocking socket API with XAPOLL for asynchronous
362+
event-driven I/O.
363+
364+
if SM_HTTPC
365+
366+
config SM_HTTPC_RESPONSE_TIMEOUT_MS
367+
int "HTTP client idle timeout (ms)"
368+
range 1000 300000
369+
default 30000
370+
help
371+
Idle timeout for an active HTTP request in milliseconds.
372+
The timeout is extended when data is received; if no activity occurs
373+
before it expires, the request is aborted and reported as an error.
374+
375+
endif # SM_HTTPC
376+
355377
if NRF_MODEM_LIB_TRACE
356378

357379
choice NRF_MODEM_LIB_TRACE_BACKEND

0 commit comments

Comments
 (0)