curlhttpsink

curlhttpsink — sink that uploads data to a server using libcurl

Properties

gchar * content-type Read / Write
gchar * proxy Read / Write
gchar * proxy-passwd Read / Write
gint proxy-port Read / Write
gchar * proxy-user Read / Write
gboolean use-content-length Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseSink
                    ╰── GstCurlBaseSink
                        ╰── GstCurlTlsSink
                            ╰── GstCurlHttpSink

Description

This is a network sink that uses libcurl as a client to upload data to an HTTP server.

Example launch line

Upload a JPEG file to an HTTP server.

1
2
3
4
5
6
gst-launch-1.0 filesrc location=image.jpg ! jpegparse ! curlhttpsink  \
    file-name=image.jpg  \
    location=http://192.168.0.1:8080/cgi-bin/patupload.cgi/  \
    user=test passwd=test  \
    content-type=image/jpeg  \
    use-content-length=false

Synopsis

Element Information

plugin

curl

author

Patricia Muscalu <patricia@axis.com>

class

Sink/Network

Element Pads

name

sink

direction

sink

presence

always

details

ANY

Functions

Types and Values

struct GstCurlHttpSink

struct GstCurlHttpSink;

Property Details

The “content-type” property

  “content-type”             gchar *

The mime type of the body of the request.

Flags: Read / Write

Default value: NULL


The “proxy” property

  “proxy”                    gchar *

HTTP proxy server URI.

Flags: Read / Write

Default value: NULL


The “proxy-passwd” property

  “proxy-passwd”             gchar *

Proxy user password to use for proxy authentication.

Flags: Read / Write

Default value: NULL


The “proxy-port” property

  “proxy-port”               gint

HTTP proxy server port.

Flags: Read / Write

Allowed values: >= 0

Default value: 3128


The “proxy-user” property

  “proxy-user”               gchar *

Proxy user name to use for proxy authentication.

Flags: Read / Write

Default value: NULL


The “use-content-length” property

  “use-content-length”       gboolean

Use the Content-Length HTTP header instead of Transfer-Encoding header.

Flags: Read / Write

Default value: FALSE