Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curlopt_postfieldsize_large(3) [mojave man page]

CURLOPT_POSTFIELDSIZE_LARGE(3)				     curl_easy_setopt options				    CURLOPT_POSTFIELDSIZE_LARGE(3)

NAME
CURLOPT_POSTFIELDSIZE_LARGE - size of POST data pointed to SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE_LARGE, curl_off_t size); DESCRIPTION
If you want to post data to the server without having libcurl do a strlen() to measure the data size, this option must be used. When this option is used you can post fully binary data, which otherwise is likely to fail. If this size is set to -1, the library will use strlen() to get the size. DEFAULT
-1 PROTOCOLS
HTTP(S) EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { const char *data = large_chunk; curl_off_t length_of_data; /* set somehow */ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* size of the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, length_of_data); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); curl_easy_perform(curl); } AVAILABILITY
Along with HTTP RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_POSTFIELDS(3), CURLOPT_COPYPOSTFIELDS(3), CURLOPT_POSTFIELDSIZE(3), libcurl 7.54.0 February 03, 2016 CURLOPT_POSTFIELDSIZE_LARGE(3)

Check Out this Related Man Page

CURLOPT_POSTFIELDSIZE(3)				     curl_easy_setopt options					  CURLOPT_POSTFIELDSIZE(3)

NAME
CURLOPT_POSTFIELDSIZE - size of POST data pointed to SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size); DESCRIPTION
If you want to post data to the server without having libcurl do a strlen() to measure the data size, this option must be used. When this option is used you can post fully binary data, which otherwise is likely to fail. If this size is set to -1, the library will use strlen() to get the size. If you post more than 2GB, use CURLOPT_POSTFIELDSIZE_LARGE(3). DEFAULT
-1 PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { const char *data = "data to send"; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* size of the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) strlen(data)); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); curl_easy_perform(curl); } AVAILABILITY
Along with HTTP RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_POSTFIELDS(3), CURLOPT_POSTFIELDSIZE_LARGE(3), libcurl 7.54.0 February 03, 2016 CURLOPT_POSTFIELDSIZE(3)
Man Page

14 More Discussions You Might Find Interesting

1. Programming

coverting html data to text in 'c'

hi, iam reading the webpage using curl socket. so iam geting the data in html format so how can convert html data to text data ,so i can move forward. thank u, sree (3 Replies)
Discussion started by: phani_sree
3 Replies

2. Shell Programming and Scripting

http post with data from variable?

Hi am using a variable in my http post message which is getting data from the select query as follows. if i use some values assigned to that variable , http post works fine but if i use the data of select query its not working...what could be issue? #!/bin/bash export... (3 Replies)
Discussion started by: aemunathan
3 Replies

3. Shell Programming and Scripting

Help with using lynx/wget/curl when a link has an ampersand

Hi, for my own interest I want to scrape a lot of data off the Maple Story game rankings page. The problem is, when I want to get the data at this page maplestory(dot)nexon(dot)net/Rankings/OverallRanking.aspx?type=overall&s=&world=0&job=0&pageIndex=6 It gives me the data at this page ... (3 Replies)
Discussion started by: seagaia
3 Replies

4. UNIX for Dummies Questions & Answers

Basic cURL help!

hi!! this is my first post!! our university student search has this form which uses POST method(the website is swd.bits-goa.ac.in/searchform1)..now i tried sending post data from cURL... curl -o this.html --data "name=rohan&id=&hostel=&room=&branch=&search=Search"... (9 Replies)
Discussion started by: slotlocker
9 Replies

5. Shell Programming and Scripting

Php posting help

Hello unix.com I want to use curl to post some logs to a remote server using curl. $ch = curl_init("http://example.com/post/post.php"); curl_setopt($ch, CURLOPT_POST ,1); curl_setopt($ch, CURLOPT_POSTFIELDS ,"FOUT=hash.gif&DATA=$message"); curl_setopt($ch, CURLOPT_HEADER ... (4 Replies)
Discussion started by: galford
4 Replies

6. Shell Programming and Scripting

Specifying IP address with curl/wget

Hello, I am wondering does anyone know of a method using curl/wget or other where by I could specify the IP address of the server I wish to query for a website. Something similar to editing /etc/hosts but that can be done directly from the command line. I have looked through the man pages... (4 Replies)
Discussion started by: colinireland
4 Replies

7. Red Hat

Posting Multiple Files using cURL

Hi, I am currently in the process of creating a script that will use cURL to HTTP POST the contents of a file on the server. I am able to run the command; curl -d @/path/to/file/filename.dat "https://posting.server.com/test.aspx"to post a single file and this works as expected. The... (4 Replies)
Discussion started by: MarkPaxo
4 Replies

8. Shell Programming and Scripting

CURL Button Click Issue

I am trying to perform a button click via cURL and I am having an issue possibly due to java script on click. The HTML source code is: <input id="ctl00_SPWebPartManager1_g_1bb6dc86_55ab_4ea9_a4db_4747922a8202_ctl00_RequestOption_0" class="radio" type="radio" checked="checked" value="1"... (5 Replies)
Discussion started by: js0505
5 Replies

9. Shell Programming and Scripting

How to specify a port with curl?

HI Im trying to use curl to send a xml file and im trying to send it over a specific port poes anyone know how to specify a port with curl? the command im using is C:\curl -X POST -d @C:\myfile.xml http://yourAddress.com/XMLInterface.asp (5 Replies)
Discussion started by: Paul Walker
5 Replies

10. Shell Programming and Scripting

Perl HTTP::Tiny

I'm currently using OpenBSD current as of yesterday. Both curl and wget aren't not part of the OpenBSD base and I would rather attempt to reboot my cable modem (SB6183) using perl HTTP:Tiny if possible. The following 2 commands work and both will reboot my modem: curl -d Rebooting=1... (3 Replies)
Discussion started by: azdps
3 Replies

11. Shell Programming and Scripting

Curl/http 503 error with bash script

I am trying to use REST API and curl in a bash script to generate a http report. The curl command at the end of the script should generate a html file but instead I get an error "HTTP/1.1 503 Service Unavailable". This is the script #!/bin/bash export... (7 Replies)
Discussion started by: kieranfoley
7 Replies

12. Shell Programming and Scripting

Replace line for another line in file

Hey, i have been struggeling to find the answer myself so this is the best forum has alwyas help me :) i have an API that get data from a provider via curl. the data comes like this : AccountCode1234 CompneyNameA Credit: 200 AccountCode5678 CompneyNameB Credit: 200 AccountCode999... (3 Replies)
Discussion started by: batchenr
3 Replies

13. UNIX for Advanced & Expert Users

Accessing REST Web Service

Hello: I have created a REST service that is currently running on a Unix server. I issued a cURL command to call the REST service and verified it's working as designed; curl --request POST command and the url I used to test it is localhost:8090/someservice/somename. I have a teammate who now... (6 Replies)
Discussion started by: asthern14
6 Replies

14. Web Development

CURL - Post Form Isssue ( sequel )

Hi, I write a new thread to discuss about my closed topic with new information ( /280990-curl-post-form-issue.html ) The previous post was closed because of missing informations, I didn't have access yet to server logs. ----------------------------------------------------------------------... (4 Replies)
Discussion started by: Fred13
4 Replies