Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery.common.java
/
utils
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
745930e3
authored
Nov 29, 2016
by
Gil Sade
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
changed accept encoding header to *
parent
06092d89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
build.gradle
src/main/java/http/simpleRestClient/SimpleRestClient.java
build.gradle
View file @
745930e3
group
'com.ipgallery.common'
group
'com.ipgallery.common'
version
'1.1.
4
'
version
'1.1.
5
'
apply
plugin:
'java'
apply
plugin:
'java'
apply
plugin:
'maven-publish'
apply
plugin:
'maven-publish'
...
...
src/main/java/http/simpleRestClient/SimpleRestClient.java
View file @
745930e3
...
@@ -384,7 +384,8 @@ public class SimpleRestClient extends SimpleHttpClient {
...
@@ -384,7 +384,8 @@ public class SimpleRestClient extends SimpleHttpClient {
else
if
(
request
.
getMethod
()
==
SimpleHttpRequest
.
Method
.
POST
)
{
else
if
(
request
.
getMethod
()
==
SimpleHttpRequest
.
Method
.
POST
)
{
request
.
addHeader
(
HttpHeaders
.
CONTENT_TYPE
,
"application/json; charset=UTF-8"
);
request
.
addHeader
(
HttpHeaders
.
CONTENT_TYPE
,
"application/json; charset=UTF-8"
);
request
.
addHeader
(
HttpHeaders
.
ACCEPT
,
MediaType
.
APPLICATION_JSON
);
request
.
addHeader
(
HttpHeaders
.
ACCEPT
,
MediaType
.
APPLICATION_JSON
);
request
.
addHeader
(
HttpHeaders
.
ACCEPT_ENCODING
,
"gzip, deflate"
);
// request.addHeader(HttpHeaders.ACCEPT_ENCODING, "gzip, deflate");
request
.
addHeader
(
HttpHeaders
.
ACCEPT_ENCODING
,
"*"
);
}
else
if
(
request
.
getMethod
()
==
SimpleHttpRequest
.
Method
.
DELETE
)
{
}
else
if
(
request
.
getMethod
()
==
SimpleHttpRequest
.
Method
.
DELETE
)
{
request
.
addHeader
(
HttpHeaders
.
ACCEPT
,
MediaType
.
APPLICATION_JSON
);
request
.
addHeader
(
HttpHeaders
.
ACCEPT
,
MediaType
.
APPLICATION_JSON
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment