[ 
https://issues.apache.org/jira/browse/GROOVY-8209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17755228#comment-17755228
 ] 

ASF GitHub Bot commented on GROOVY-8209:
----------------------------------------

blackdrag closed pull request #556: GROOVY-8209 simple http client without 
extra dependecies
URL: https://github.com/apache/groovy/pull/556




> create simple http client
> -------------------------
>
>                 Key: GROOVY-8209
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8209
>             Project: Groovy
>          Issue Type: New Feature
>          Components: groovy-jdk
>            Reporter: Dmitry Lukyanov
>            Priority: Minor
>         Attachments: HTTP.groovy
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The idea is to create a simple http client based only on current groovy 
> abilities.
> Code example:
> {code:java}
> def r = HTTP.get(
>   url : 'https://www.googleapis.com/customsearch/v1',
>   query: [ q: 'hello world' ],
>   headers: [
>     'Accept':'application/json',
>     //'Authorization' : ...,
>   ],
>   //optional - ssl context 
>   ssl : getNaiveSSLContext(),
>   //optional - receiver
>   receiver : { stream,context -> new JsonParser().parse(stream) },
>   //optional - body to perform data transfer (post/put/... http methods) 
> )
> assert r.response.code == 200
> println r.response.body
> {code}
> I suggest to integrate this class (attached) into groovy.
> Before opening a pull request I'd like to know opinion of the language 
> owners/gurus: is it ok? or maybe this functionality repeats something, that i 
> missed/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to