Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions system/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ##############################################################################
# apps/system/curl/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

if(CONFIG_SYSTEM_CURL)
nuttx_add_application(
NAME
${CONFIG_SYSTEM_CURL_PROGNAME}
SRCS
curl_main.c
STACKSIZE
${CONFIG_SYSTEM_CURL_STACKSIZE}
PRIORITY
${CONFIG_SYSTEM_CURL_PRIORITY})
endif()
42 changes: 42 additions & 0 deletions system/curl/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config SYSTEM_CURL
tristate "curl HTTP command"
default n
depends on NETUTILS_WEBCLIENT
---help---
Enable the "curl" command: a small command-line HTTP client
supporting GET and POST (and other methods via -X), custom
headers (-H), a raw request body (-d, including -d @file) and
multipart/form-data file uploads (-F name=@file), built on top
of the netutils webclient library. HTTP only (no HTTPS).

if SYSTEM_CURL

config SYSTEM_CURL_PROGNAME
string "Program name"
default "curl"
---help---
This is the name of the program that will be used when the
NSH ELF program is installed.

config SYSTEM_CURL_PRIORITY
int "curl task priority"
default 100

config SYSTEM_CURL_STACKSIZE
int "curl stack size"
default DEFAULT_TASK_STACKSIZE

config SYSTEM_CURL_BUFFERSIZE
int "curl transfer buffer size"
default 512
---help---
Size of the buffer used to hold the request/response headers and
to stream body data. It must be large enough to hold the whole
request header line and the whole response header.

endif
25 changes: 25 additions & 0 deletions system/curl/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/system/curl/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_SYSTEM_CURL),)
CONFIGURED_APPS += $(APPDIR)/system/curl
endif
36 changes: 36 additions & 0 deletions system/curl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
############################################################################
# apps/system/curl/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

# curl built-in application info

PROGNAME = $(CONFIG_SYSTEM_CURL_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_CURL_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_CURL_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_CURL)

# curl command

MAINSRC = curl_main.c

include $(APPDIR)/Application.mk
Loading
Loading