Skip to content

Commit

Permalink
Manual fix x-www-form-unencoded in spell check (#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Jan 17, 2018
1 parent 1df5f35 commit a9fb495
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.cognitiveservices.spellcheck.ActionType;
import com.microsoft.azure.cognitiveservices.spellcheck.ErrorResponseException;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import java.io.IOException;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import okhttp3.ResponseBody;
import retrofit2.Response;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.Part;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
import rx.functions.Func1;

import java.io.IOException;

/**
* Initializes a new instance of the SpellCheckAPIImpl class.
Expand Down Expand Up @@ -170,9 +171,9 @@ private void initializeService() {
* used by Retrofit to perform actually REST calls.
*/
interface SpellCheckAPIService {
@Multipart
@FormUrlEncoded
@POST("spellcheck")
Observable<Response<ResponseBody>> spellChecker(@Header("X-BingApis-SDK") String xBingApisSDK, @Header("Accept-Language") String acceptLanguage, @Header("Pragma") String pragma, @Header("User-Agent") String userAgent, @Header("X-MSEdge-ClientID") String clientId, @Header("X-MSEdge-ClientIP") String clientIp, @Header("X-Search-Location") String location, @Query("ActionType") ActionType actionType, @Query("AppName") String appName, @Query("cc") String countryCode, @Query("ClientMachineName") String clientMachineName, @Query("DocId") String docId, @Query("mkt") String market, @Query("SessionId") String sessionId, @Query("SetLang") String setLang, @Query("UserId") String userId, @Part("Mode") String mode, @Part("PreContextText") String preContextText, @Part("PostContextText") String postContextText, @Part("Text") String text);
Observable<Response<ResponseBody>> spellChecker(@Header("X-BingApis-SDK") String xBingApisSDK, @Header("Accept-Language") String acceptLanguage, @Header("Pragma") String pragma, @Header("User-Agent") String userAgent, @Header("X-MSEdge-ClientID") String clientId, @Header("X-MSEdge-ClientIP") String clientIp, @Header("X-Search-Location") String location, @Query("ActionType") ActionType actionType, @Query("AppName") String appName, @Query("cc") String countryCode, @Query("ClientMachineName") String clientMachineName, @Query("DocId") String docId, @Query("mkt") String market, @Query("SessionId") String sessionId, @Query("SetLang") String setLang, @Query("UserId") String userId, @Field("Mode") String mode, @Field("PreContextText") String preContextText, @Field("PostContextText") String postContextText, @Field("Text") String text);

}

Expand Down

0 comments on commit a9fb495

Please sign in to comment.