You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Laura Morales <la...@mail.com> on 2017/04/24 06:20:47 UTC
Fuseki support text/plain
Right now when I send POST requests to Fuseki, it seems to accept "application/x-www-form-urlencoded" requests only. Using "text/plain" results in this error
Error 415: Unsupported: text/plain
Fuseki - version 2.5.0 (Build date: 2017-01-31T16:47:42+0000)
I was wondering if there is a way to configure Fuseki to accept text/plain too, where users can send their queries in plain text (perhaps without any query= argument) and the whole text is simply interpreted to be the query.
Re: Fuseki support text/plain
Posted by Andy Seaborne <an...@apache.org>.
https://www.w3.org/TR/sparql11-protocol/#query-via-post-direct
On 24/04/17 19:25, Laura Morales wrote:
>> What is the reason you would like to send queries with that particular mimetype? Is it a question of configuring an HTTP client in your code?
>
> It's not really about the mime type, it's about sending a plain text request where the whole content is interpreted as the query, without the need of query=... arguments or the need of encoding. I thought text/plain would work, but apparently it's not the correct approach. "application/sparql-query" works fine for this purpose, so I'm just going to use this instead of the former.
>
Re: Fuseki support text/plain
Posted by Laura Morales <la...@mail.com>.
> What is the reason you would like to send queries with that particular mimetype? Is it a question of configuring an HTTP client in your code?
It's not really about the mime type, it's about sending a plain text request where the whole content is interpreted as the query, without the need of query=... arguments or the need of encoding. I thought text/plain would work, but apparently it's not the correct approach. "application/sparql-query" works fine for this purpose, so I'm just going to use this instead of the former.
Re: Fuseki support text/plain
Posted by oc...@gmail.com.
What is the reason you would like to send queries with that particular mimetype? Is it a question of configuring an HTTP client in your code?
---
A. Soroka
Laura Morales wrote on 4/24/17 2:46 AM:
>>> text/plain is not supported by SPARQL Protocol, but you can try
>>> application/sparql-query.
>>>
>>> https://www.w3.org/TR/sparql11-protocol/#query-operation
>>>
>>> On Mon, 24 Apr 2017 at 08.21, Laura Morales <la...@mail.com> wrote:
>>>
>>>> Right now when I send POST requests to Fuseki, it seems to accept
>>>> "application/x-www-form-urlencoded" requests only.
>>
>> "only"?
>>
>> What URL are you POSTing to?
>
> Sorry, using "only" was probably a mistake as "application/sparql-query" seems to work too (it just seemed to me that I couldn't use anything but "application/x-www-form-urlencoded").
> Anyway, just using a vanilla installation of Fuseki on a private server.
>
Re: Fuseki support text/plain
Posted by Laura Morales <la...@mail.com>.
> > text/plain is not supported by SPARQL Protocol, but you can try
> > application/sparql-query.
> >
> > https://www.w3.org/TR/sparql11-protocol/#query-operation
> >
> > On Mon, 24 Apr 2017 at 08.21, Laura Morales <la...@mail.com> wrote:
> >
> >> Right now when I send POST requests to Fuseki, it seems to accept
> >> "application/x-www-form-urlencoded" requests only.
>
> "only"?
>
> What URL are you POSTing to?
Sorry, using "only" was probably a mistake as "application/sparql-query" seems to work too (it just seemed to me that I couldn't use anything but "application/x-www-form-urlencoded").
Anyway, just using a vanilla installation of Fuseki on a private server.
Re: Fuseki support text/plain
Posted by Andy Seaborne <an...@apache.org>.
On 24/04/17 09:34, Martynas Jusevi\u010dius wrote:
> text/plain is not supported by SPARQL Protocol, but you can try
> application/sparql-query.
>
> https://www.w3.org/TR/sparql11-protocol/#query-operation
>
> On Mon, 24 Apr 2017 at 08.21, Laura Morales <la...@mail.com> wrote:
>
>> Right now when I send POST requests to Fuseki, it seems to accept
>> "application/x-www-form-urlencoded" requests only.
"only"?
What URL are you POSTing to?
Andy
>> Using "text/plain"
>> results in this error
>>
>> Error 415: Unsupported: text/plain
>> Fuseki - version 2.5.0 (Build date: 2017-01-31T16:47:42+0000)
>>
>> I was wondering if there is a way to configure Fuseki to accept text/plain
>> too, where users can send their queries in plain text (perhaps without any
>> query= argument) and the whole text is simply interpreted to be the query.
>>
>
Re: Fuseki support text/plain
Posted by Martynas Jusevičius <ma...@graphity.org>.
text/plain is not supported by SPARQL Protocol, but you can try
application/sparql-query.
https://www.w3.org/TR/sparql11-protocol/#query-operation
On Mon, 24 Apr 2017 at 08.21, Laura Morales <la...@mail.com> wrote:
> Right now when I send POST requests to Fuseki, it seems to accept
> "application/x-www-form-urlencoded" requests only. Using "text/plain"
> results in this error
>
> Error 415: Unsupported: text/plain
> Fuseki - version 2.5.0 (Build date: 2017-01-31T16:47:42+0000)
>
> I was wondering if there is a way to configure Fuseki to accept text/plain
> too, where users can send their queries in plain text (perhaps without any
> query= argument) and the whole text is simply interpreted to be the query.
>