[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56624] webwrite only supports form-encoded pa
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #56624] webwrite only supports form-encoded parameters, not user-defined data |
Date: |
Fri, 12 Jul 2019 17:01:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?56624>
Summary: webwrite only supports form-encoded parameters, not
user-defined data
Project: GNU Octave
Submitted by: mtmiller
Submitted on: Fri 12 Jul 2019 02:01:22 PM PDT
Category: Octave Function
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
Octave's webwrite function only allows data to be POSTed in form-encoded
key-value pairs. It can't yet be used to send user-defined data such as a XML
or JSON blob.
This example should ideally work
options = weboptions ('MediaType', 'text/plain')
response = webwrite ('http://localhost/post', 'This is a test message',
options)
and should be the same as
curl -X POST -H 'Content-Type: text/plain' -d 'This is a test message'
'http://localhost/post'
But it instead tries to parse the 'data' argument into key-value pairs and
POST as a form anyway.
This is related to the message in weboptions that the MediaType keyword is not
yet implemented. If MediaType is not set, then webwrite seems to be working
correctly. This is also a Matlab compatibility issue, but since this function
is brand new it's fair to consider it a feature request.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56624>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56624] webwrite only supports form-encoded parameters, not user-defined data,
Mike Miller <=